I made a Java application with JCEF.
It can be launched with Eclipse, but launched by batch file I made, always return exception like below:
- Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jdk1.8.0_121\jre\bin\jawt.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.cef.SystemBootstrap$1.loadLibrary(SystemBootstrap.java:24)
at org.cef.SystemBootstrap.loadLibrary(SystemBootstrap.java:36)
at org.cef.CefApp.<init>(CefApp.java:144)
at org.cef.CefApp.getInstance(CefApp.java:221)
at org.cef.CefApp.getInstance(CefApp.java:208)
at jcef.Jcef.<init>(Jcef.java:75)
at Main.exec(Main.java:15)
at Main.main(Main.java:7)
and here is my bat file code:
- Code: Select all
java -jar TEST_JCEF.jar
pause
and how to made the jar from my program:
1.right click program
2.export
3.select make runnable jar
4.select "Package required libraries into generated JAR" and finish
Maybe something is wrong in my buildpath?