Ghost4J. java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64' - java

I included Ghost4J 0.45 into my project using Maven and installed Ghostscript into C:\Program Files\gs\gs9.06.
But I still get an error java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll64'.
I added into PATH env variable directory where located 'gsdll64.dll' (i.e. C:\Program Files\gs\gs9.06). Also tried launch application using -Djava.library.path=/path/to/dir.
But I alwways get UnsatisfiedLinkError (but when I launch using JVM argument -Djava.library.path I get ClassNotFound exception (Eclipse can't find Main class, but I manually point Eclipse to Main class when I laucnh my app))/

Does it work if you copy gsdll64 to your working directory? :-)

if u want to use a system property
-Djna.library.path=/path/to/dir should be used instead of -Djava.library.path=/path/to/dir

Related

Module not found error for nodejavabridge_bindings.node when executing jest test although file exists on specified directory

I am using NCache NodeJS client package and writing tests by calling NCache API's. Package has dependency of Java. After I installed and used that package to write simple test. Test execution failed with module not Found error:
Error Message
Messgae:
The specified module could not be found.
\\D:\GitHome\Test\node_modules\java\build\Release\nodejavabridge_bindings.node
at Runtime._loadModule (node_modules/jest-runtime/build/index.js:893:29)
at Object.<anonymous> (node_modules/java/lib/nodeJavaBridge.js:21:16)
File in above mentioned directory exits.
Note: When I used that package in simple index.js file it worked fine as expected but unable to run with jest.
No major configuration done for jest in package.json file.
Java jdk-11.0.6 installed on box and JAVA_HOME is set.
Package.json
test.specs.js
Unable to identify the exact reason of failure therefore stuck on how to resolve it.
Environment:
OS: Windows
node: 14.15.3
jest: 26.6.3
C:\Program Files\OpenJDK\jdk-16.0.1\bin\server needs to be in your path. On windows can Edit the system environment > Environment Variables... > System variables and add C:\Program Files\OpenJDK\jdk-16.0.1\bin\server
Other option is to add it to your test runner. For example in WebStorm edit the Run Configurations and add Environment variables PATH=C:\Program Files\OpenJDK\jdk-16.0.1\bin\server

How to solve could not find or load mainclass error?

I am getting this error if I add new component to my frame if I remove it then it works.
I done this troubleshooting
(1)deleting index folder and restart computer and netbeans
(2)increased heap size in conf file
(3)set environment variable in windows system as
:-User variable name = CLASSPATH
:-variable value = C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Java\jre1.8.0_40\bin;.
:-System variable name :-Path
:-System Variable value:-C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Java\jre1.8.0_40\bin
but the problem persists
if i add new component(radiobutton,label,scrollpane) it gives me this error:
you can try Clean and build your project, if it doesn't work, you can check the posts from
Netbeans - Error: Could not find or load main class ,
Error: Could not find or load main class (netbeans and java)
or
What does "Could not find or load main class" mean?
With Java 11 you can start a class from the terminal with
java classname.java

java.lang.UnsatisfiedLinkError: Unable to load library

DLL INSTANCE = (DLL) Native.loadLibrary(Settings.getSingletonInstance().getProperty("default.ergoPointer.path"), DLL.class);
I store the dll path in settings file. When i take output of
Settings.getSingletonInstance().getProperty("default.ergoPointer.path"
here : C:\Users\Argenit\Desktop\aaa\dll\ErgoPointer_64_Bit.dll
Error part :
java.lang.UnsatisfiedLinkError: Unable to load library
'C:\Users\Argenit\Desktop\aaa\dll\ErgoPointer_64_Bit.dll': Native
library
(win32-x86-64/C:\Users\Argenit\Desktop\aaa\dll\ErgoPointer_64_Bit.dll)
not found in resource path
([file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/bin/,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/resources/,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/fits.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/json.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/junit-4.8.2.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/kdu_jni.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/log4j-1.2.16.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/JNA/jna-4.1.0.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/JNA/jna-platform-4.1.0.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/ini4j-0.5.4.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/JNA/,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/gluegen-rt.jar,
file:/C:/Users/Argenit/Desktop/Pathology_JAVA/Digital_Pathology/lib/jogl.jar])
If i add (dll) as a external class folder in project and write : loadLibrary("ErgoPointer_64_Bit"), it works in this machine but when i take the runnable jar, it couldn' t find ErgoPointer_64_Bit so i want to give absolute path of dll. But it doesn' t work for me.
I also tried :
C:\Users\Argenit\Desktop\aaa\dll\ErgoPointer_64_Bit
dll\ErgoPointer_64_Bit
ErgoPointer_64_Bit
dll\ErgoPointer_64_Bit.dll
ErgoPointer_64_Bit.dll
Set the system property java.library.path before the call Native.loadLibrary() with just the base name.
System.setProperty("java.library.path",
"C:\\Users\\Argenit\\Desktop\\aaa\\dll;"
+ System.getProperty("java.library.path"));
DLL INSTANCE = (DLL) Native.loadLibrary("ErgoPointer_64_Bit", DLL.class);
You can also set the java.library.path on the command line. eg.
java "-Djava.library.path=C:\Users\Argenit\Desktop\aaa\dll\" -jar somejar.jar

Minecraft Custom Launcher 1.7.10 no lwggl in java.library.path

I'm trying to create my custom C# minecraft launcher but I have this error.
I created a launcher.bat file first in order to solve this problem quicker.
I have this code to start minecraft:
java
-Djava.library.path=C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\
-cp
C:\Users\Davide\AppData\Roaming\.minecraft\versions\1.7.10\1.7.10.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\15.0\guava-15.0.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\com\mojang\authlib\1.5.21\authlib-1.5.21.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl\2.9.1\lwjgl-2.9.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.1\lwjgl_util-2.9.1.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\lwjgl-platform-2.9.1-natives-windows.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch\5.16\twitch-5.16.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch-platform\5.16\twitch-platform-5.16-natives-windows-64.jar;
C:\Users\Davide\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch-external-platform\4.5\twitch-external-platform-4.5-natives-windows-64.jar;
net.minecraft.client.main.Main
--username MYUSERNAME
--accessToken MYACCESSTOKEN
--version 1.7.10
--gameDir C:\Users\Davide\AppData\Roaming\.minecraft
--assetsDir C:\Users\Davide\AppData\Roaming\.minecraft\assets
--userProperties {}
--uuid MYUUID
But when i start it says Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path.
I found on the internet that's a problem of this line
-Djava.library.path=C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\
But I double checked the path is correct.
Thank you in advance.
EDIT
I solved this problem easily taking out this from the arguments:
-Djava.library.path=C:\Users\Davide\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl-platform\2.9.1\
And putting al the DLL's in the local folder, i can't still access them with the full path though
Ok i found the answer. I had to use the local path and not the absolute one

cannot find org.neo4j.batchimport

I am continuing to have trouble with the import.bat file for the Neo4j batch importer. I started a new thread as the original problem was resolved.
from the command prompt I run
import.bat test.db sample\nodes.csv sample\rels.csv
With some variations on the path listing for the files, including absolute paths. I continue to get the following error message
The system cannot find the path specified.
Error: Could not find or load main class org.neo4j.batchimport.Importer
I also tried running import.sh from Cygwin and in my Debian VM but keep getting the error
Error: Could not find or load main class org.neo4j.batchimport.Importer
What am I doing wrong?
Please download the zip-file, not the github clone.
This is a pre-build binary as outlined in the readme, that doesn't require that you have to have maven installed to build it.

Categories

Resources