简体   繁体   English

在Eclipse上安装Java3D

[英]Installing Java3D on Eclipse

Sorry in advance if this is a really bad question, but I can't seem to find a recent enough tutorial on how to install Java3D on Eclipse 3.6.0 for Mac OSX 10.6.6. 如果这是一个非常糟糕的问题,请提前抱歉,但是我似乎找不到足够的最新教程来介绍如何在Mac OSX 10.6.6的Eclipse 3.6.0上安装Java3D。 If anyone knows where a good tutorial is, or if you can give me instructions, please do so. 如果有人知道好的教程在哪里,或者您可以给我说明,请这样做。 Thanks! 谢谢!

To add the jar's to a specific project's classpath : 要将jar添加到特定项目的classpath中

  1. Right-click (or cmd-click on mac?) your project in the Project Explorer view and choose Properties > Java Build Path > Libraries . 在“项目资源管理器”视图中右键单击(或在Mac上用cmd单击吗?),然后选择“ 属性”>“ Java构建路径”>“库”
  2. Add the folder "\\System\\Library\\Java\\Extensions" by clicking the "Add External Class Folder..." button 通过单击“添加外部类文件夹...”按钮,添加文件夹“ \\ System \\ Library \\ Java \\ Extensions”

EDIT: 编辑:

I would suggest the following, given that 鉴于

  • you have the JDK (version 1.5.0 or higher) installed 您已安装JDK(版本1.5.0或更高版本)
  • you have Eclipse for Java or Java EE developers installed (not Eclipse Classic for example) 您已经安装了Eclipse for Java或Java EE开发人员(例如,没有Eclipse Classic)
  • you can build a vanilla, HelloWorld Java application already 您已经可以构建一个香草的HelloWorld Java应用程序

Basically, it sounds like you might not have added the Java 3D api's to your JRE. 基本上,听起来您可能没有将Java 3D api添加到JRE中。 The download you linked to in your original question contains a help file named README-unzip.html, which is where I obtained the following instructions from: 您在原始问题中链接的下载文件包含一个名为README-unzip.html的帮助文件,在该文件中,我从以下位置获得了以下说明:

  1. Download java3d-1_5_1-XXX.zip to a temporary directory, for example, "/tmp" 将java3d-1_5_1-XXX.zip下载到一个临时目录,例如“ / tmp”

  2. Unzip java3d-1_5_1-XXX.zip into "/tmp" as follows: 将java3d-1_5_1-XXX.zip解压缩为“ / tmp”,如下所示:

      cd /tmp unzip java3d-1_5_1-*.zip 

    This will create a "java3d-1_5_1-XXX" subdirectory in /tmp where the downloaded files can be found. 这将在/ tmp中创建一个“ java3d-1_5_1-XXX”子目录,可以在其中找到下载的文件。 The file you need for manual installation is "j3d-jre.zip". 手动安装所需的文件是“ j3d-jre.zip”。

  3. Unzip Java 3D 1.5.1 into the "jre" directory of your JDK. 将Java 3D 1.5.1解压缩到JDK的“ jre”目录中。 For example, if your JDK is in "/usr/java/jdk1.6.0_01/jre", you would do the following: 例如,如果您的JDK位于“ /usr/java/jdk1.6.0_01/jre”中,则可以执行以下操作:

      cd /usr/java/jdk1.6.0_01/jre unzip /tmp/java3d-1_5_1-*/j3d-jre.zip 

    Verify that the j3dcore.jar, j3dutils.jar, and vecmath.jar files end up in "/usr/java/jdk1.6.0_01/jre/lib/ext" 验证j3dcore.jar,j3dutils.jar和vecmath.jar文件是否以“ /usr/java/jdk1.6.0_01/jre/lib/ext”结尾

These threads might also be helpful: 这些线程可能也有帮助:

From: August 来自:八月

The previous instructions are NOT for installing java3d into Eclipse. 先前的说明不适用于将java3d安装到Eclipse中。 In the same readme file it says: Users of IDEs such as NetBeans and Eclipse should consult the IDE's documentation to see how to add jar files and native libraries to their current project. 在相同的自述文件中表示:IDE的用户(例如NetBeans和Eclipse)应查阅IDE的文档,以了解如何将jar文件和本机库添加到当前项目中。

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

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