开发者

Installing Java3D on Eclipse

I'm trying to use Java3D in my project. This is the error I receive:

29-Dec-2010 1:01:29 AM javax.media.j3d.NativePipeline getSupportedOglVendor
SEVERE: java.lang.UnsatisfiedLinkError: no j3dcore-ogl-chk in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: no j3dcore-d3d in java.library.path
 at java.lang.ClassLoader.loadLibrary(Unknown Source)
 at java.lang.Runtime.loadLibrary0(Unknown Source)
 at java.lang.System.loadLibrary(Un开发者_StackOverflow社区known Source)
 at javax.media.j3d.NativePipeline$1.run(NativePipeline.java:189)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.media.j3d.NativePipeline.loadLibrary(NativePipeline.java:180)
 at javax.media.j3d.NativePipeline.loadLibraries(NativePipeline.java:137)
 at javax.media.j3d.MasterControl.loadLibraries(MasterControl.java:948)
 at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:280)
 at World.<init>(World.java:10)
 at Start.main(Start.java:12)

I have copied the .jar files into my project's lib folder and linked them in Project -> Properties -> Add Jar File. There was also a .dll file in the Java3D download that I haven't touched or included in any way. What am I missing?


On Windows you must add the directory containing the DLL‘s (e.g. …\j3d-1_5_2-windows-i586\bin) to the PATH environment variable. The “Unzip Instructions” incorrectly says that the nonexistent “…\lib\i386” should be added (version 1.5.2).

Not able to test it on Linux, but probably you must add the directory with the SO files to the LD_LIBRARY_PATH environment variable.

More details in the README-unzip.html file in j3d-1_5_2-windows-i586.zip or j3d-1_5_2-linux-i586.zip (same for other systems).


For me, the answer was "project/properties/java build path/source tab/expand and select native library location / navigate to i386 folder." by telman shahbazov (problems with java3D lib configuration). Thought I'd put this here for anyone else googling with this problem.


when you install the java3d, in the created folder, there are bin and ext folders, do the next:

Copy the .dll file from:

.../Program Files/Java/Java3D/1.5.1/bin

to

.../Program Files/Java/jre7/bin

Copy all .jar files from:

.../Program Files/Java/Java3D/1.5.1/lib/ext

to

.../Program Files/Java/jre7/lib/ext


Include the .dll file in your system's classpath, and then restart eclipse.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜