Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.lwjgl.Sys$1.run(Sys.java:73)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:95)
at org.lwjgl.Sys.<clinit>(Sys.java:112)
at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
at renderEngine.DisplayManager.createDisplay(DisplayManager.java:23)
at engineTester.MainGameLoop.main(MainGameLoop.java:45)
this is the error that i get saying that there is no lwjgl how could i fix this
I got this error after I exported the project since when i had it in the jde it worked just fine
java -jar Ecosistembio.jar -Djava.library.path=C:\Users\User\Desktop\Eco\lib
This is the command i have tried using thought its to no result
Your path no have the necessary dependency(artifact) for the Ecosistembio.jar.
Check this https://stackoverflow.com/a/6092576/10354937
Related
Can you make a jar file out of this project that runs with no initializererror?
Project here.
https://github.com/piersy/BasicTesseractExample
I've tried using jarsplice to splice the project jar with the tesseract & javacpp jars and I get this initializer error, when running the jar in the command prompt. I don't know if jarsplice is even required but that was my effort.
C:\Users\user\Desktop\JavaWorkspace>java -jar fatOCR.jar Exception in thread "main" java.lang.ExceptionInInitializerError
at BasicTesseractExampleTest.givenTessBaseApi_whenImageOcrd_thenTextDisplayed(BasicTesseractExampleTest.java:14)
at runOCR.main(runOCR.java:7) Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at java.base/sun.reflect.annotation.AnnotationParser.parseClassArray(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseArray(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseMemberValue(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.base/java.lang.Class.createAnnotationData(Unknown Source)
at java.base/java.lang.Class.annotationData(Unknown Source)
at java.base/java.lang.Class.createAnnotationData(Unknown Source)
at java.base/java.lang.Class.annotationData(Unknown Source)
at java.base/java.lang.Class.getAnnotation(Unknown Source)
at java.base/java.lang.reflect.AnnotatedElement.isAnnotationPresent(Unknown Source)
at java.base/java.lang.Class.isAnnotationPresent(Unknown Source)
at org.bytedeco.javacpp.ClassProperties.load(ClassProperties.java:128)
at org.bytedeco.javacpp.Loader.loadProperties(Loader.java:203)
at org.bytedeco.javacpp.Loader.load(Loader.java:372)
at org.bytedeco.javacpp.Loader.load(Loader.java:354)
at org.bytedeco.javacpp.tesseract$TessBaseAPI.<clinit>(tesseract.java:3422)
... 2 more
I don't think you can run this project because it contains only tests (1 test in this case) and does not contain the main method.
When i run the code from the following link, https://github.com/sagioto/LipReading/blob/master/lipreading-gui/src/main/java/edu/lipreading/gui/MainFrame.java ; I get the following error :
Exception in thread "Thread-6" java.lang.UnsatisfiedLinkError: C:\Users\Harish ram\AppData\Local\Temp\javacpp13384533628877\jniavutil.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:418)
at com.googlecode.javacpp.Loader.load(Loader.java:368)
at com.googlecode.javacpp.Loader.load(Loader.java:315)
at com.googlecode.javacv.cpp.avutil.(avutil.java:75)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.googlecode.javacpp.Loader.load(Loader.java:334)
at com.googlecode.javacv.cpp.avcodec.(avcodec.java:85)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.googlecode.javacpp.Loader.load(Loader.java:334)
at com.googlecode.javacv.cpp.avformat.(avformat.java:76)
at com.googlecode.javacv.FFmpegFrameRecorder.(FFmpegFrameRecorder.java:111)
at com.googlecode.javacv.FFmpegFrameRecorder.(FFmpegFrameRecorder.java:104)
at com.googlecode.javacv.FFmpegFrameRecorder.(FFmpegFrameRecorder.java:107)
at com.googlecode.javacv.FFmpegFrameRecorder.(FFmpegFrameRecorder.java:101)
at main.java.edu.lipreading.gui.LipReaderPanel.getVideoFromSource(LipReaderPanel.java:150)
at main.java.edu.lipreading.gui.VideoCapturePanel$1.run(VideoCapturePanel.java:89)
at java.lang.Thread.run(Unknown Source)
I dont understand what is wrong. Can anyone help me ?
The code tries to use the JavaCV wrapper for FFmpeg (FFmpegFrameRecorder) you need FFmpeg installed in your system in order to use it.
Take a look at the requirements section at the main page of JavaCV and the Quick Start for OpenCV and FFmepg too.
Error
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in
java.library.path at java.lang.ClassLoader.loadLibrary(Unknown
Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at
java.lang.System.loadLibrary(Unknown Source) at
org.lwjgl.Sys$1.run(Sys.java:73) at
java.security.AccessController.doPrivileged(Native Method) at
org.lwjgl.Sys.doLoadLibrary(Sys.java:66) at
org.lwjgl.Sys.loadLibrary(Sys.java:95) at
org.lwjgl.Sys.(Sys.java:112) at
org.lwjgl.opengl.Display.(Display.java:132) at
ColoredTriangle.start(Test3d.java:12) at Test3d.main(Test3d.java:71)
I added jar and native library. still its not working. i dont know why. image attached
How to fix it?
Re-try doing it, also maybe there's so something wrong with your path setup, try doing it with this: http://lwjgl.org/wiki/index.php?title=Setting_Up_LWJGL_with_Eclipse
I don't undestand how this solution worked.
But just add this in the start of the main function or something.
System.setProperty("org.lwjgl.librarypath", new File("Path to library/natives/youros").getAbsolutePath());
Note: I got this solution from somewhere else.
I am stuck in the very beginning step. I just install JDK and Play, added all necessary directories in the PATH variable. When I run PLAY command, I get the UnsatisfiedLinkError mentioned below. Please let me know how to fix this.
Running Windows 8 x64 and the PATH directory is
C:\iSanthosh\dev.tools\play-2.1.3\;C:\Program
Files\Java\jdk1.7.0_25\jre\bin;C:\Program
Files\Java\jdk1.7.0_25\bin;C:\Program Files\Java\jre7\bin;
Error:
java.lang.UnsatisfiedLinkError: C:\Users\Santhosh\AppData\Local\Temp\jline_0_12_2.dll: Access is denied
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at jline.WindowsTerminal.initializeTerminal(WindowsTerminal.java:240)
at jline.Terminal.setupTerminal(Terminal.java:75)
at jline.Terminal.getTerminal(Terminal.java:26)
at jline.ConsoleReader.<init>(ConsoleReader.java:174)
at jline.ConsoleReader.<init>(ConsoleReader.java:169)
at jline.ConsoleReader.<init>(ConsoleReader.java:157)
at play.console.Console$.<init>(Console.scala:15)
at play.console.Console$.<clinit>(Console.scala)
at play.console.Console.run(Console.scala:262)
at play.console.Console.run(Console.scala:259)
at xsbt.boot.Launch$.run(Launch.scala:55)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:69)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:31)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.UnsatisfiedLinkError: C:\Users\Santhosh\AppData\Local\Temp\jline_0_12_2.dll: Access is denied
Change your permissions on the folder, or you can use sudo
sudo play
I installed jpcap library when i run my program I got this error. I am sure that add jpcap.jar and jpcap.dll to correct directory but i do not know what is the problem!
anyone know what is the erorr?
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\Java\jre7\bin\jpcap.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at jpcap.JpcapCaptor.<clinit>(JpcapCaptor.java:251)
at EWMAStableIP.getNumOfNewIPs(EWMAStableIP.java:106)
at EWMAStableIP.initial(EWMAStableIP.java:343)
at Frame.initialize(Frame.java:78)
at Frame.<init>(Frame.java:52)
at Frame$1.run(Frame.java:39)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
When you load native library like .so on Linux or .dll on Windows using System.loadLibrary() it looks for those shared library in both PATH environment variable and java.libarary.path system property, if it doesn't find shared library it throws "Exception in thread "main" java.lang.UnsatisfiedLinkError: no in java.library.path". now trick is that in Windows it picks up dll form System32 folder and most of the time System32 exits in path so we don't usually come up with this problem. anyway if you are repeatedly getting this Error than you can try following step which may help you to resolve java.lang.UnsatisfiedLinkError in your java application.
Try Following these steps :
1) Check your PATH for Java , whether it contains required dll or not.
2) Verify your java.library.path in case you have set it for required dll.
3) Run your java application with command : java -Djava.library.path= "your dll path"
4) Try specifying base name for the library and loading library using System.loadLibaray("name) where name is without dll.
5) Linux loads dynamic linked library(.so) from LD_LIBRARY_PATH so you may want to have your shared library directory included in LD_LIBRARY_PATH e.g.
6) load library by providing absolute path like "C:/WINNT/system32/digest.dll"
export LD_LIBRARY_PATH=/shared library (.so)
Main point is JVM should find your dll and providing explicitly path with -Djava.library.path always help me.
Some other points worth noting while working with System dependent libraries:
1) They make java code platform dependent.
2) System.loadLibrary() is equivalent to Runtime.getRuntime.loadLibary().
3) load System.loadLibary(libary) in static initalizer block so that it only gets loaded when containing class gets loaded and
avoid reloading of it.
Another worth noting point is the actual error message java.lang.UnsatisfiedLinkError throws:
if it shows "Exception in thread "main" java.lang.UnsatisfiedLinkError: no dll in java.library.path" means JVM is not able to locate and load library.
if it shows thread "main" java.lang.UnsatisfiedLinkError: com......' i.e. prints class or method name than may be something is wrong with library itself like half copied dll.
Some time you may also get
Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: digest.dll
at java.lang.Runtime.load0(Runtime.java:767)
at java.lang.System.load(System.java:1003)
to solve this just provide absolute path for library and you will be fine.
That’s all on how to fix Exception in thread "main" java.lang.UnsatisfiedLinkError: no dll in java.library.path" , share your experience if you have faced this java.lang.UnsatisfiedLinkError before.
Refered here
Probably you run 64-bit jpcap on a 32-bit wincap ..
Please reinstall wincap and ensure that jpcap and wincap both have the same 'bits' with jdk.