Java 3D in eclipse Mac OSX not functioning

classic Classic list List threaded Threaded
63 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

Sven Gothel
Administrator
On 09/03/2014 08:20 PM, gouessej [via jogamp] wrote:
> You wrote "I do everything that is mentioned there", you just forgot to
> mention that you didn't strictly follow most of my indications, concerning the
> classpath, the command line options, the locations of the JARs, ...
>
> You're welcome. Please strictly follow the instructions and keep your
> environment clean to avoid such problems next time. I have never told you to
> install an outdated version but anyway, it was the occasion of improving my
> tutorial. Thank you.

Good stuff .. human error (the usual) leads to enhancements, extraordinary :)

Just humans, mostly harmless.

(thought I need to inject a few lines of humor here ..)




signature.asc (828 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

gouessej
Administrator
He probably got the obsolete version from here:
https://java3d.java.net/binary-builds-pre.html
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

hharrison
In reply to this post by CMBR
If you wouldn't mind, could you take a few minutes and tell us about your project that uses Java3D? I'm always interested to hear how it is being used.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

Wade Walker
Administrator
In reply to this post by gouessej
gouessej wrote
Wade, how can it impact Swing applications?
A long time ago, there was some bit of code in JOGL that used a function of AWT in a worker thread, which violated the Mac rule that AWT has to be on the main thread. Using the headless option fixed that problem on the Mac (which didn't show up on Windows or Linux). But maybe this is not needed anymore, I'll have to check my own apps now :)
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

CMBR
This post was updated on .
In reply to this post by hharrison
Once again many thanks for the help before and sorry for the late post, but in response to "If you wouldn't mind, could you take a few minutes and tell us about your project that uses Java3D? I'm always interested to hear how it is being used.

Harvey"

I am actually a Theoretical Physics grad student (with a fairly negligible formal background in programming and computer literacy, hence my difficulty in following the simple instructions earlier).

I used Java3D in my undergraduate project, was running monte carlo algorithms to generate random walks on cubic lattices under various conditions , thought it would be a cool idea to render the random samples visually (actually I designed it to be compatible in dimensions over 3 and went up to 60 which obviously can't be rendered in a 3D space, however, independent of temperature the spatial dimensions are always rendered to similar effect in all integer dimensions above 2 with purely mathematical consequences as d evolves), turned out to be pretty cool anyways, interesting to visually demonstrate the consequences of fundamental statistics, in fact if i had a powerful enough machine I could potentially render the beginnings of a fractal as a biproduct of the random walk, can PM you my dissertation/source code if you are genuinely interested.

EDIT: Is it likely the .jars/Java3D will still function correctly in MacOSX Yosemite? I plan on upgrading when it's released but not at the peril of my program. =/
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

gouessej
Administrator
Hi

CMBR wrote
I am actually a Theoretical Physics grad student (with a fairly negligible formal background in programming and computer literacy, hence my difficulty in following the simple instructions earlier).
In my humble opinion, you didn't spend enough time in fully reading my tutorial first, you asked some questions whose answers were already in it, you worked in a hurry without trying to understand what you were doing and then you used some obsolete JARs probably found on java.dev.net or Oracle website whereas you claimed to follow my simple instructions. This wasn't a problem of skills, you panicked and you took the risk of breaking your environment by putting the JARs into several locations without taking care of the consequences. If you put them into the JVM or into the directories used by the extensions, it might have broken some other applications or applets using Java 3D and/or JOGL. I appreciate helping people but I expect from them a wish to understand what they do, a wish to learn (even though you're not a student in computer science), not a wish of delegating their "job". Reading carefully my tutorial would have probably helped you to make Java 3D work on your machine more straightforwardly without testing random JARs found on Internet. Moreover, I tried to keep it short, I assumed that most people wouldn't be tempted to skip most paragraphs but it's probably what you did as you were unable to find the directories used by the extensions mentioned in BOLD.

CMBR wrote
EDIT: Is it likely the .jars/Java3D will still function correctly in MacOSX Yosemite? I plan on upgrading when it's released but not at the peril of my program. =/
It should work on Yosemite. Java 3D and JogAmp's Ardor3D Continuation rely on the same version of JOGL and somebody tested my game on Yosemite. However, in my humble opinion, if you fear breaking your program after each upgrade, maybe you should consider using another operating system ;)
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

CMBR
This post was updated on .
You really do seem annoyed... I'm sorry I had such an effect, I'm only human, I made mistakes and missed some points when following your instructions because I had absolutely no idea what I was doing, I asked for help, I overcame the problem. Once again sorry for the trouble incurred by my ignorance and lack of understanding... Not really sure what else to say.
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

Wade Walker
Administrator
In reply to this post by CMBR
Hi, I'm actually very interested in hearing more about how you've used Java3D in a physics project :) I'm an engineer by training, but dabble in computational physics, and published a paper (http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0039999) where the underlying simulator was written in Java and used JOGL (though not Java3D). Currently I'm working on a computational elastodynamics project, also using Java and JOGL. I think it's a nice platform for scientific programming, and it's good to see others using it the same way.

On another note, I think your email exchange here is a very useful reminder to us maintainers that not all of the users of JOGL are experts in programming and OpenGL :) On the internet, where you interact with people only through text, it's easy to start thinking that others are just like us, and hard to keep in mind that we know nothing about them or their age or experience level. As long as you're doing your best and working in good faith, there's no shame in asking questions :)
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

CMBR
I had a brief perusal of your paper and its quite impressive , I'm only just starting my masters degree in October over here in the UK so not had the chance to publish any papers as of yet but computational particle physics is my main area of interest, I sent you a PM with my dissertation as you say you are interested, it includes the source code in the appendix. I agree it is a very nice platform for scientific programming, was pretty cool to convey my model visually with Java3D, loads of potential.
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

hharrison
I would be interested to have a look as well, please shoot me a copy: harvey.harrison@gmail.com

Glad that it worked out so well for you!

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

CMBR
Thanks! It has been sent.
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

gouessej
Administrator
In reply to this post by CMBR
CMBR wrote
You really do seem annoyed... I'm sorry I had such an effect, I'm only human, I made mistakes and missed some points when following your instructions because I had absolutely no idea what I was doing, I asked for help, I overcame the problem. Once again sorry for the trouble incurred by my ignorance and lack of understanding... Not really sure what else to say.
I'm not annoyed, of course everybody can make mistakes and we all have to start somewhere, I don't blame your "ignorance" or your lack of understanding but you wrote "I had absolutely no idea what I was doing", this is the problem. Our time is precious. If you had known what you had done, you would have been able to tell us more precisely which steps you had followed, we would have been able to solve your problem faster and I would have been less worried. When you try to solve a problem in physics, you don't try to skip steps or to do it in a hurry, you try to understand each step. I just advise you to do the same in computer science and it would be better for those who try to help you too. I'm accustomed with end users telling me "it's broken... I did nothing wrong", I just expect better from a student, rather "I did this, this and this...". I spent several hours in writing this tutorial, do you imagine how I feel when someone claiming to read it doesn't find an information clearly mentioned? Yes, I was upset, I wondered if you were joking. I'm sorry and anyway your problem was a good pretext to improve its presentation especially for lazy people who just look at the summary and who don't want to read everything.

Don't worry, it's ok for me. Good luck with Java 3D.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

Wade Walker
Administrator
In reply to this post by CMBR
Nice work on the dissertation, very impressive stuff! Let us know if you publish a paper in grad school that uses JOGL, we even have a custom citation for people to use in that case :)
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

CMBR
Thanks! And that sounds awesome, I'll be sure to let you know if I publish any JOGL based papers for sure. Might be back for help on my next grad project depending on what it is, I look forward to more technical discussions in the future!
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

everythingConnected
This post was updated on .
In reply to this post by gouessej
Hi
I am having a similar problem to this thread and have just spent all day following your instructions without success.

I have a Java 3D application I wrote which I am trying to get to work on a Mac. It is packaged in a jar.

This was written in quite old java3d but still runs fine on my pc.

I have installed:
gluegen-rt-natives-universal.jar
gluegen-rt.jar
j3dcore.jar
j3dutils.jar
joal-natives-macosx-universal.jar
joal.jar
jogl-all-natives-macosx-universal.jar
jogl-all.jar
vecmath.jar

into a folder called Java3D straight onto the system with path only "Macintosh HD" then "Java3D"

and am trying to run using:
java -cp .:/Java3D/gluegen-rt.jar:.:/Java3D/j3dcore.jar:.:/Java3D/j3dutils.jar:.:/Java3D/joal.jar:/Java3D/jogl-all.jar:.:/Java3D/vecmath.jar: -jar MyJar.jar

but get the error:
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
AWT not found
Exception in thread "main" java.lang.NoClassDefFoundError: apple/awt/CGraphicsDevice
        at javax.media.j3d.GraphicsConfigTemplate3D.<clinit>(GraphicsConfigTemplate3D.java:55)

Any help gratefully received. I am only trying to get this to work on a mac for a friend, am not very good with the command line use of a mac and am frustrated at having spent a day on this problem, and have tried to follow your instructions in your blog as well as possible.

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

hharrison
The problem is almost certainly an old version of java3d in the extensions folder that will be looked up before anything else in the classpath, you'll need to make sure those other versions are removed.  I believe there is a not in Julien's instructions about this, specific to OSX.

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

everythingConnected
Thanks for the prompt reply. Yes, I have been through all the folders in Java and made sure that there are no old jars lying around from earlier attempts to install it.

One odd thing with macs that i havent seen before is that they seem to hide the actual java install behind an internet plugin feature that masks where the the JRE sits, and cant be opened to see whats in there. I had installed a JDK on top of this. This puts the JDK folders in a location I would expect as a pc user, but the MAC  doesnt use this anyway.

Is there any chance there are Java 3D files in the macs own install hiding behind the internet plugin that I cant see. I have seen forum links that say Java3D used to be installed by default on a mac?
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

everythingConnected
In reply to my previous post I have now explored the java internet plugin using the terminal (this allows you into the 'hidden' folders and there are no Java3D files in there either.

Following on from a previous message in this thread, I can get a different error message. If I put all the jar files and my project jar into the same directory and run the command:

java -Djava.ext.dirs="" -cp gluegen-rt.jar:j3dcore.jar:j3dutils.jar:joal.jar:jogl-all.jar:vecmath.jar: -jar MyJar.jar

I get the message:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/Canvas3D

Does that explain anything?
Thanks again
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

gouessej
Administrator
Hi

You should reread the "man" of the java command, especially the paragraph about the jar option and its impact on the classpath handling...

I updated my instructions several times, it mentions some directories in which Java3D might be installed under Mac OS X. I understand it's a bit hard to follow.

Please update the classpath attribute of the manifest or use the same command line without the "-jar" option.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java 3D in eclipse Mac OSX not functioning

gouessej
Administrator
In reply to this post by everythingConnected
Moreover, don't try to install Java3D dirtily as it has been done for years. It's just a third party library after all.
Julien Gouesse | Personal blog | Website
1234