views:

150

answers:

2

Hi,

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!

A: 

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.

instanceofTom
A: 

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.

Michael Aaron Safyan
So the first fix worked, putting the jars in the Extensions folder. What is weird to me though is that netbeans hid the 1.5.2 methods from me even when I added them as external jars. But when I added the jars to the extension folder the methods showed up both under the 1.6JDK and in the external jars.Weird wild stuff, but thanks for the help Michael.
achar
That's because Extension's contents are listed in Netbeans in the menu item Tools > Java Platforms > Classes.@achar did you also need to Update JOGL?
Juan Romero Abelleira