Java3d + osx +网豆

发布于 2024-08-14 14:02:28 字数 480 浏览 4 评论 0原文

我有一个在solaris 上开发的java3d 项目,出于多种原因我试图将其转移到我的macbook 上(其中之一是我们的solaris 机器非常慢)。

基本上我想要的是在这个项目中使用 osx + netbeans,但它似乎引用了 mac 1.6 JDK 中过时的 java3d 版本中未包含的 java3d 方法。我解决此问题的第一次尝试是将 java3d 1.5.2 库作为项目的外部 jar 包含在内,但似乎 netbeans 仍在尝试引用 1.6 JDK 中的旧库而不是 1.5.2 j3d 库。

此外,当我在 netbeans 文件资源管理器中探索 1.5.2 jar 时,方法(未包含在 1.6 jdk 中)不会显示在各自的类下。然而,当我在Solaris上做同样的事情时,方法确实出现了。所以基本上,我知道我试图包含的罐子实际上包含我需要的方法/类。 netbeans 只是找不到它们

如果有任何不清楚的地方请让我澄清。刚写完这篇文章我就很困惑。

预先感谢您的帮助!

I have a java3d project that was developed on solaris that I am trying to move onto my macbook for a variety of reasons (1 being that our solaris machines are painfully slow).

Basically what I want is to use osx + netbeans for this project but it seems to reference java3d methods that are not included in the outdated version of java3d in the mac 1.6 JDK. My first attempt at resolving this issue was to include the java3d 1.5.2 libraries as external jars for the project but it seems netbeans is still trying to reference the old libraries in the 1.6 JDK instead of the 1.5.2 j3d libraries.

Also when I explore the 1.5.2 jars within the netbeans file explorer the methods (that are not included in the 1.6 jdk) do not show up under their respective classes. However, when I do the same thing on solaris the methods do show up. So basically, I know that the jars I am trying to include do in fact contain the methods/classes I need. netbeans just won't find them

If anything is unclear please ask me to clarify it. I got confused just writing this up.

Thanks in advance for the help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

握住你手 2024-08-21 14:02:28

听起来您可能需要调整 CLASSPATH 以将较新的 java3d jar 放在较旧的之前。尝试将较新的 Java3D JAR 放入 /Library/Java/Extensions 中。并且,如果这不起作用,请将 ~/.MacOSX/environment.plist 中的 CLASSPATH 变量设置为指向较新的 JAR(需要注销然后重新登录才能使更改生效)。不过,如果其他依赖 Java3D 的 Java 应用程序需要旧版本,这可能不太好。基本上,您遇到的是“DLL 地狱”或“依赖地狱”,Java 除外。使用 Maven2 构建系统可以解决该问题,该系统需要对依赖项进行显式版本控制并自动下载并安装所需的依赖项。另请注意,NetBeans 会自动识别使用 Maven2 的项目。

It sounds like you may need to adjust your CLASSPATH to put the newer java3d jars ahead of the older ones. Try putting the newer Java3D JARs in /Library/Java/Extensions. And, if that doesn't work, set the CLASSPATH variable in ~/.MacOSX/environment.plist to point to the newer JARs (will require logging out and then logging back in for the change to take effect). This might not be nice to other Java applications that depend on Java3D, if they require the older version, though. Basically, what you are encountering is "DLL hell" or "dependency hell", except with Java. Using the Maven2 build system, which requires explicit versioning of dependencies and which automatically downloads and installs required dependencies, would fix that problem. Also note that projects that use the Maven2 are automatically recognized by NetBeans.

素罗衫 2024-08-21 14:02:28

不确定这是否相关,但您可以尝试调整 Netbeans 项目的 Java PlatformSource/Binary Format 设置。

右键单击 Netbeans 项目,然后单击“属性”,在“源”面板下的“源/二进制格式”组合框中调整 JDK 版本。在“库”面板下,在“Java 平台”组合框中调整平台版本。

摆弄这些设置为我解决了类似的问题。

Not sure if this is related, but you could try adjusting the Java Platform and Source/Binary Format settings of your Netbeans project.

Right click on the Netbeans project and click properties, under the 'Sources' Panel adjust the JDK version in the 'Source/Binary Format' combo-box. Under the 'Libraries' panel adjust the platform version in the 'Java Platform' combo-box.

Fiddling with those settings solved a similar problem for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文