简体   繁体   English

在Eclipse上安装Java3D

[英]Installing Java3D on Eclipse

I'm trying to use Java3D in my project. 我正在尝试在我的项目中使用Java3D。 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(Unknown 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. 我已将.jar文件复制到项目的lib文件夹中,并在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. Java3D下载中还有一个.dll文件,我没有以任何方式触及或包含该文件。 What am I missing? 我错过了什么?

On Windows you must add the directory containing the DLL's (eg …\\j3d-1_5_2-windows-i586\\bin) to the PATH environment variable. 在Windows上,您必须将包含DLL的目录(例如... \\ j3d-1_5_2-windows-i586 \\ bin)添加到PATH环境变量中。 The “Unzip Instructions” incorrectly says that the nonexistent “…\\lib\\i386” should be added (version 1.5.2). “解压缩指令”错误地指出应该添加不存在的“... \\ lib \\ i386”(版本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. 无法在Linux上测试它,但可能必须将带有SO文件的目录添加到LD_LIBRARY_PATH环境变量中。

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). 有关更多详细信息,请参阅j3d-1_5_2-windows-i586.zip或j3d-1_5_2-linux-i586.zip中的README-unzip.html文件(对于其他系统也是如此)。

For me, the answer was "project/properties/java build path/source tab/expand and select native library location / navigate to i386 folder." 对我来说,答案是“项目/属性/ java构建路径/源选项卡/展开并选择本机库位置/导航到i386文件夹”。 by telman shahbazov ( problems with java3D lib configuration ). 由telman shahbazov( java3D lib配置问题 )。 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: 当您安装java3d时,在创建的文件夹中,有bin和ext文件夹,请执行下一步:

Copy the .dll file from: 复制.dll文件:

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

to

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

Copy all .jar files from: 复制所有.jar文件:

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

to

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

在系统的类路径中包含.dll文件,然后重新启动eclipse。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM