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
Related
I am trying to run a face recognition project which uses opencv and its contrib function.
I have imported the opencv_342.jar as user libraries. and give the native library location to the folder where all the dll files are.
It is still program giving error of
Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\opencv_build\bin\libopencv_java342.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 com.demo.HelloWorld.main(HelloWorld.java:9)
I don't know why It is unable to find other libraries which dll files are in bin folder
I'm getting an error where my maven build works fine (using mvn install: the produced executable runs in Windows), but when I try to run main directly from IntelliJ, it is looking for SWT's GTK dlls, which is of course not correct:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-4528 in java.library.path
no swt-gtk in java.library.path
Can't load library: C:\Users\brandon\.swt\lib\win32\x86_64\swt-gtk-4528.dll
Can't load library: C:\Users\brandon\.swt\lib\win32\x86_64\swt-gtk.dll
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at edu.cornell.ansci.dairy.econ.ui.MainWindow$.main(MainWindow.scala:175)
at edu.cornell.ansci.dairy.econ.ui.MainWindow.main(MainWindow.scala)
In fact the actual file contents of the directory look correct, but this is not what is being looked for:
brandon#DESKTOP-MU8LD7O:/mnt/c/Users/brandon/.swt/lib/win32/x86_64$ ls
swt-gdip-win32-4528.dll swt-win32-4528.dll
Here is an image of the run configuration in Intellij (Default JDK is Zulu - maybe I should try to install another?):
I have made a application to grab video from a webcam and detect motion using OpenCV and JavaCV. I am trying to export as an executable jar using eclipse. The program runs fine in eclipse as does the exe jar on the computer I coded the program on.
What I am trying to accomplish is to make the exe Jar run on computers that don't have OpenCV installed. Basically what I would consider a portable application. When I run the exe jar on a different computer that has nothing installed other than the JRE I get unsatisfied link errors seen below.
Exception in thread "Video Thread" java.lang.UnsatisfiedLinkError: C:\Users\JohnD\AppData\Local\Temp\javacpp91062429652918\jniopencv_core.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:566)
at com.googlecode.javacpp.Loader.load(Loader.java:489)
at com.googlecode.javacpp.Loader.load(Loader.java:431)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:136)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:97)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.googlecode.javacpp.Loader.load(Loader.java:453)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:85)
at com.googlecode.javacv.OpenCVFrameGrabber.start(OpenCVFrameGrabber.java:174)
at VideoPanel.run(VideoPanel.java:163)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no opencv_core244 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.googlecode.javacpp.Loader.loadLibrary(Loader.java:593)
at com.googlecode.javacpp.Loader.load(Loader.java:481)
... 13 more
I have looked for a solution to what I am doing wrong. Most of the topics I have come across with unsatisfied link errors like the ones I am receiving have been trying to get it to run the first time through within there IDE, which is not the case here. I would think my dependencies are correct in the libraries in the build path since I can get it to run perfectly when I am on the computer that has everything installed but I still believe I am doing something wrong with the build.
Again I am trying to make it so the Jar can run on computers where OpenCV/JavaCV is not installed. Any help would be greatly appreciated.
If opencv is not installed in the target machine, than you need to deliver the necessary opencv's dll file and set the corresponding library path, opencv is a precondition of javacv
for example:
jar yourapp.jar -Djava.library.path="/path/to/OpenCV/library"
also check this answer
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.
I have an application that uses JNI for some native functions that are in a DLL. The application runs correctly on windows XP, however when I run the program on Window 2000, I receive the following:
java.lang.UnsatisfiedLinkError: C:\Program Files\Compunetix\stixDlls\CMSCI Dll.d
ll: The specified procedure could not be found
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.compunetix.vsd.stix.main.Main.main(Main.java:165)
Any ideas?
Thanks
it might be that the dll uses another dll that is not available in that second machine. Use Dependency walker/ to find exactly what dll is missing.