I have problem running MT4J examples. I try running he advance MTShell and I get the following errors.
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: C:\Users\Umar\Downloads\mt4j-desktop\jogl.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1957)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1087)
at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.(WindowsGLDrawableFactory.java:60)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
at org.mt4j.util.opengl.CustomPGraphicsOpenGL.allocate(CustomPGraphicsOpenGL.java:73)
at processing.core.PGraphics3D.setSize(PGraphics3D.java:326)
at processing.core.PApplet.makeGraphics(PApplet.java:1325)
at processing.core.PApplet.size(PApplet.java:1146)
at processing.core.PApplet.size(PApplet.java:1106)
at org.mt4j.MTApplication.setup(MTApplication.java:210)
at processing.core.PApplet.handleDraw(PApplet.java:1580)
at processing.core.PApplet.run(PApplet.java:1502)
at java.lang.Thread.run(Thread.java:724)
Your libraries aren't correctly linked. I answered this exact question in another post:
Error while running MT4J
Related
I have a javafx program that I was formerly developing in sublime text before migrating to intellij as my editing environment. As of now, I can compile and run without error through the command line (Windows). However, when I try to run it from intellij, I get the following message:
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(LauncherImpl.java:157)
at com.sun.javafx.application.LauncherImpl$$Lambda$1/868693306.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3201)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3169)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3142)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3118)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3098)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3091)
at Main.setNewScene(Main.java:40)
at Main.start(Main.java:29)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(LauncherImpl.java:821)
at com.sun.javafx.application.LauncherImpl$$Lambda$50/2069914884.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(PlatformImpl.java:323)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/646648017.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/1106256089.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/151108218.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
at com.sun.glass.ui.win.WinApplication$$Lambda$38/2004449016.run(Unknown Source)
... 1 more
Process finished with exit code 1
I don't know how to fix this.
The problem turned out to be intellij having an issue with the source folder in the project directory. By moving all my java files to a new directory and reopening it in intellij as a new project with a single, correct source folder, the problem completely went away.
(As stated in the question, the code itself was functional and worked through the command line.)
First sorry for my bad english..
Well, i'm having a huge problem with the 2 .jar or libraries JAVACV and OPENCV, i'm triying to build a LOGIN with Face tracking and Face Recognition, but when i try to run the Main.java popups this problem:
run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopencv_objdetect in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:701)
at com.googlecode.javacpp.Loader.load(Loader.java:578)
at com.googlecode.javacpp.Loader.load(Loader.java:532)
at com.googlecode.javacv.cpp.opencv_objdetect.<clinit>(opencv_objdetect.java:91)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at com.googlecode.javacpp.Loader.load(Loader.java:553)
at com.googlecode.javacpp.Loader.load(Loader.java:532)
at com.googlecode.javacv.cpp.opencv_objdetect$CvHaarClassifierCascade.<clinit>(opencv_objdetect.java:170)
at reconocimiento.ReconocimientoCaras.<init>(ReconocimientoCaras.java:51)
at reconocimiento.ReconocimientoCaras.<clinit>(ReconocimientoCaras.java:53)
at reconocimiento.Main.main(Main.java:25)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\Carlos\AppData\Local\Temp\javacpp42613800564148\jniopencv_objdetect.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
at java.lang.Runtime.load0(Runtime.java:795)
at java.lang.System.load(System.java:1062)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:690)
... 11 more
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
How can i solve this problem?
Check your OS that whether it is 32bit or 64bit.Then install the appropriate version opencv and javacv.
Worked on a JavaFX 2 application and while testing on linux i got:
:/tmp$ /opt/Oracle_Java/jdk1.7.0_13/bin/java -jar MyAdessoNotificationTool.jar
java.lang.UnsatisfiedLinkError: com.sun.glass.ui.gtk.GtkTimer._startImpl(Ljava/lang/Runnable;I)J
at com.sun.glass.ui.gtk.GtkTimer._startImpl(Native Method)
at com.sun.glass.ui.gtk.GtkTimer._start(GtkTimer.java:24)
at com.sun.glass.ui.Timer.start(Timer.java:69)
at com.sun.javafx.tk.quantum.QuantumToolkit.finishLaunching(QuantumToolkit.java:366)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:89)
at java.lang.Thread.run(Thread.java:722)
any ideas what it is?
greetings
Kaito
I'm trying to run the java-fx sample Modena that can be found here. I use Netbeans 8.0 Beta, JDK8 last release on Windows 8. I wonder why I can't even compile it.
In fact the first exception that happens is this.
I note to be a newbie in JavaFX.
The line of exception in the program is:
private static final String testAppCssUrl = Modena.class.getResource("TestApp.css").toExternalForm();
I assert that I verified and the file existed. And the example jar file can be run on my computer with my Java default configuration which is explained above.
Exception in thread "JavaFX Application Thread" Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:340)
at com.sun.javafx.application.LauncherImpl$2.run(LauncherImpl.java:330) at com.sun.javafx.application.LauncherImpl$2.run(LauncherImpl.java:330)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:331) at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:331)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:297)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:294)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
at modena.Modena.<clinit>(Modena.java:100)
... 13 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.NullPointerException
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:362)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
... 5 more
The problem was with running only the main file with Shift+F6. I should have used F6 to run the project instead. F6 runs the project but Shift+F6 only runs the file containing the static main method without considering the project configuration.
I have Android Studio (Google I/O Preview).
I created an android project in Android Studio, and when I run it, the Studio tell me :
/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -ea -Didea.launcher.port=7534 -Didea.launcher.bin.path=/home/username/android-studio/bin -Dfile.encoding=UTF-8 -classpath /home/username/android-studio/lib/idea_rt.jar:/home/username/android-studio/plugins/junit/lib/junit-rt.jar:/home/username/android-studio/sdk/platforms/android-17/android.jar:/home/username/android-studio/sdk/platforms/android-17/data/res:/home/username/android-studio/sdk/tools/support/annotations.jar:/home/username/AndroidStudioProjects/test/test/libs/android-support-v4.jar com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 #/tmp/idea_junit6666593680737984739.tmp -socket52225
Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/ResultPrinter
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 3 more
Process finished with exit code 1
What can I try?I've Googled this but haven't had much luck.
I don't know.When I use the Windows Version, I didn't meet any error;
Sounds like to me from your windows version has the missing class while your Linux Version does not.
Caused by: java.lang.ClassNotFoundException: junit.textui.ResultPrinter
Make sure you have this class in your library or where ever you are calling it for.
Hope this helps or points you to the right direction.