N
Neo
I have been trying to link my JAR file with a third party JAR that
depends on a DLL for the native method calls. The program compiles but
when I execute it, I get a ClassNotFoundException
- Libraries:
c:\programs\lib.jar
c:\programs\lib.dll
- Application
c:\mydir\application.jar
application.jar uses lib.jar which itself uses lib.dll
-- application.java ---
//application.class is inside application.jar
//Class hello is inside the test package which is inside the lib.jar.
import test.hello;
public class application
{
public void run()
{
hello test = new hello();
}
}
When I run the program (application.jar), I use: java -classpath "c:
\programs\lib.jar" -Djava.library.path="c:\programs" -jar c:\mydir
\application.jar
However, I still get ClassNotFoundException
depends on a DLL for the native method calls. The program compiles but
when I execute it, I get a ClassNotFoundException
- Libraries:
c:\programs\lib.jar
c:\programs\lib.dll
- Application
c:\mydir\application.jar
application.jar uses lib.jar which itself uses lib.dll
-- application.java ---
//application.class is inside application.jar
//Class hello is inside the test package which is inside the lib.jar.
import test.hello;
public class application
{
public void run()
{
hello test = new hello();
}
}
When I run the program (application.jar), I use: java -classpath "c:
\programs\lib.jar" -Djava.library.path="c:\programs" -jar c:\mydir
\application.jar
However, I still get ClassNotFoundException