4 Replies Latest reply: Mar 25, 2010 6:34 AM by J D McIninch
munkung Level 1 Level 1 (0 points)
i run java eclipse with VTK but can't run
output show
Exception in thread "main" java.lang.UnsatisfiedLinkError: no libvtkCommon.5.4.2.dylib in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1792)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at Cone.<clinit>(Cone.java:17)

I try set PATH library but it not work
Help me pls
thank you

MacBookPro, Mac OS X (10.6.2)
  • 1. Re: How to set PATH LIBRARY java
    J D McIninch Level 5 Level 5 (4,060 points)
    Java in OS X is no different than elsewhere.


    java -Djava.library.path=/path/to/your/library/here /path/to/your/mainClassOrJarHere


    Note that the PATH environment label is used for finding executables, it have nothing to do with Java. That said, on non-Windows systems, the default value of java.library.path is taken from the value of the environment variable LDLIBRARYPATH, so I suppose that if you wanted a UNIX-specific solution, you could do that too.
  • 2. Re: How to set PATH LIBRARY java
    munkung Level 1 Level 1 (0 points)
    java -Djava.library.path=/path/to/your/library/here /path/to/your/mainClassOrJarHere

    i don't get

    you show Example for me pls?

    Thank you sir
  • 3. Re: How to set PATH LIBRARY java
    munkung Level 1 Level 1 (0 points)
    I set in Terminal but It's not work

    java -Djava.library.path=/Users/ADMIN/Development/VTKBin/lib/vtk-5.4 /Users/ADMIN/Development/VTKBin/lib/Java/vtk/vtk.jar
  • 4. Re: How to set PATH LIBRARY java
    J D McIninch Level 5 Level 5 (4,060 points)
    Can you share what the error message is?

    Is there a file called '/Users/ADMIN/Development/VTKBin/lib/vtk-5.4/libvtkCommon.5.4.2.dylib', and is it readable by the user running java?