My first time playing around with JOGL, and I get this:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt 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 com.jogamp.gluegen.runtime.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:117)
at com.jogamp.gluegen.runtime.NativeLibLoader.access$000(NativeLibLoader.java:51)
at com.jogamp.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:68)
at com.jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:56)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:1145)
at tut.Main.main(Main.java:10)
I looked around and found nothing on how to add gluegen-rt or anything else to java.library.path.
See the answer at "How to set the java.library.path from Eclipse". Basically, there is a project configuration for "Native library location".
Related
I understand that this question has been asked before, yet no matter how many solutions I try, I still get the following error:
Exception in thread "Game" 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.system.Library.loadSystem(Library.java:97)
at org.lwjgl.system.Library.<clinit>(Library.java:48)
at org.lwjgl.system.MemoryAccess.<clinit>(MemoryAccess.java:22)
at org.lwjgl.system.Pointer.<clinit>(Pointer.java:22)
at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:594)
at Main.init(Main.java:27)
at Main.run(Main.java:39)
at java.lang.Thread.run(Unknown Source)
The problem is that I have properly set my Natives:
This is the location folder:
I have just downloaded LWJGL and would like help in order to make it work.
Thanks in advance!
It turns out that my anti-virus is deleting LWJGL.
We have a JavaWebStart application, which allows to scan images and write them to a file. All works fine but today I've got an exception from a customer, which I cannot understand.
java.lang.UnsatisfiedLinkError: no jpeg 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 com.sun.imageio.plugins.jpeg.JPEGImageWriter$1.run(Unknown Source)
at com.sun.imageio.plugins.jpeg.JPEGImageWriter$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.imageio.plugins.jpeg.JPEGImageWriter.(Unknown Source)
at com.sun.imageio.plugins.jpeg.JPEGImageWriterSpi.createWriterInstance(Unknown Source)
at javax.imageio.spi.ImageWriterSpi.createWriterInstance(Unknown Source)
at javax.imageio.ImageIO$ImageWriterIterator.next(Unknown Source)
at javax.imageio.ImageIO$ImageWriterIterator.next(Unknown Source)
at de.eurodata.commons.scan.domain.ScanUtils.writeImageToFile(ScanUtils.java:81)
This exception is occured on Win7 x86. I've searched for this exception using Google but found only some irrelevant (Linux, Oracle 9i) or unanswered posts.
My question is: can I prevent this problem? Probably another pure Java jpeg plugin for ImageIO (if exists and stable)?
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: com.melloware.jintellitype.JIntellitypeException: Could not load JIntellitype.dll from local file system or from inside JAR
at com.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:114)
at com.melloware.jintellitype.JIntellitype.getInstance(JIntellitype.java:174)
at CaptureScreen.registerHotkeys(CaptureScreen.java:163)
at CaptureScreen.<init>(CaptureScreen.java:100)
at CaptureScreen.main(CaptureScreen.java:199)
... 5 more
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\B\AppData\Local\Temp: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
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.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:99)
... 9 more
I get this error when I run from the command line, however, it does not cause any issues with my program running on my machine, however, on other peoples machines the program will not run at all.
I have never come across this error before and fairly confused.. mostly that it runs fine on my machine, but not on others even though it throws this error on both.
This is a classpath error. Its likely that you have it set up right for compile time but not runtime. Make sure that either your jar is in the right location and/or that you've set your classpath to include the jar.
Go to the Jintellitype website, download the source, add it to your download folder and then move the .dll files into the folder with the Jitellitype classes after building the project
I was trying to export a test of a game I am working on(that uses the Slick library), to send to my partners who lack any IDE, all went well with the export in eclipse, but when I try to run it from command prompt, this is what I get in return.
C:\Users\Noah\Desktop>java -jar test.jar
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: 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:141)
at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
at org.nor.Main.main(Main.java:16)
... 5 more
C:\Users\Noah\Desktop>
Any idea what is going wrong?
NOTE: The project runs perfectly fine in eclipse.
You should read up on a "get started" guide on slick if you are going to use it. Slick has several dependencies who use dll's to communicate with opengl. You need to specify where those dll's are kept so these dependencies can load the dll's. I found this link that might help you do that..
You also need the native lwjgl library and point to it. The Export Jar functionality do not handle this.
Read up on the lwjgl manual for how to do this.
You have to add your jars either to:
the classpath in your java invocation
the Manifest.mf of your main jar
Java won't automatically load your jars until they are in one of these locations.
Try with File -> Properties -> Java Build Path -> Order and Export
I have the .java, .class, .cpp, .h files: http://www.ibm.com/developerworks/java/tutorials/j-jni/section2.html
After reading TotalFrickinRockstarFromMars's comment, I tried setting up classpath.
What's wrong?
Sample1.dll IS there.
Text version:
F:\workspace\JavaJNIProj\src>java Sample1
Exception in thread "main" java.lang.UnsatisfiedLinkError: F:\workspace\JavaJNIProj\src\Sample1.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
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 Sample1.main(Sample1.java:10)
It looks like you miss some dependency DLLs. You can download DependencyWalker http://www.dependencywalker.com/
This supposed to help you to find it.