English 中文(简体)
Java3d + osx + 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!

最佳回答

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.

问题回答

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.





相关问题
Portable way to get file size (in bytes) in the shell

On Linux, I use stat --format="%s" FILE, but the Solaris machine I have access to doesn t have the stat command. What should I use then? I m writing Bash scripts and can t really install any ...

Unix: fast remove directory for cleaning up daily builds

Is there a faster way to remove a directory then simply submitting rm -r -f *directory* ? I am asking this because our daily cross-platform builds are really huge (e.g. 4GB per build). So the ...

Startup time in Solaris server using shell script

How to find the start up time of a Solaris 5.1 server using a shell script,need to know how much time it took to be on running state?I need to know how much time it took to come to running mode from ...

Ruby 1.8.6 BigDecimal.to_f always returns 0,0 on Solaris

I have come across a very weird error. I m on Solaris 10, using Ruby Enterprise Edition (ruby 1.8.6 (2008-08-08 patchlevel 286) [i386-solaris2.10]) with Rails 2.3.4. I have a very weird error. In irb: ...

Where to set JDK to be used for SunOne server?

Where to set the JDK to be used by the SunOne server on Solaris? Is it all configured via an environment variable like JDK_HOME or JAVA_HOME, or is there a config file for the SunOne server somewhere ...

热门标签