Re: Java 3D in eclipse Mac OSX not functioning
Posted by everythingConnected on Feb 05, 2015; 1:18pm
URL: https://forum.jogamp.org/Java-3D-in-eclipse-Mac-OSX-not-functioning-tp4033010p4034002.html
Thanks for the help for all who have replied, as I have now managed to get my 3D application to run on a Mac, which is great.
Firstly I was not aware that when running a -jar file then any -cp argument is ignored. My mistake but its simply not something I needed to know before. Learn by experience once again I guess.
For anyone in a similar situation then I have got this to work by following the above advice, adding all the relevant Java3D, jogl etc. jar files to a 'lib' folder, and including these in the manifest file of my jar file. Then running my jar file as normal, which avoids the classpath problem I had created above. This lib folder obviously needs distributing with the application but thats no problem, and actually has numerous benefits such as not needing the user to pre-install Java3D.
Whats interesting is that this still does not work on the Mac I have been using to try and get Java3D to work on previously, but it does work on another 'clean' Mac i have just borrowed. This means that, as suggested, there are old libraries somewhere that is stopping the new Java3D system from working. This has been well described in Juliens blog and I have spent a lot of time trying to find any of these files without success, so for anyone reading this thread who has similar problems then the conclusion is either:
a) I have installed some old Java3D files that I now cannot find again, which is possible but unlikely as I have spent a lot of time checking.
b) The Mac I installed the old version on has either hidden these files or has copied them to somewhere else that I now cannot find.
I am now going to give up trying to get Java3D to work on the original Mac as it was just a test machine. If it had to work then I would now be looking at firstly uninstalling all Java from the machine and deleting everything I could relating to it, and if that doesnt work then I would have to re-install the operating system.
Appreciate the comments regarding general usage of jar files etc. As with all these things you learn by experience, and I am still learning.
Am now onto another problem with the Mac in that I used to run the jar file on windows from a .bat script so they could be run by a double click. Somehow this doesnt seem as simple on a Mac with either .sh or .command files. Time for more Mac learning....