The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by rykowski]

Hello, I'm new to 3D, so please forgive me if this question has a rather
obvious answer. I am beginning chapter 5 of your book (which I think is
great, well written). I would like to run some of the code examples to get a
better idea of what is being said in the earlier chapters. I've loaded the
Java code, but receive the following error:

C:Java3DJ3duiBookexamplesActuators>java Actuators
Exception in thread "main" java.lang.UnsatisfiedLinkError: no J3D in java.librar
y.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at javax.media.j3d.MasterControl$1.run(MasterControl.java:389)
at java.security.AccessController.doPrivileged(Native Method)
at javax.media.j3d.MasterControl.<init>(MasterControl.java:386)
at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:550)
at j3dui.utils.app.SingleFrame.<init>(SingleFrame.java:87)
at Actuators.<init>(Actuators.java:34)
at Actuators.main(Actuators.java:29)

I assume this is because I didn't have OpenGL installed. I downloaded OpenGL
1.1 (Glaux.lib, Glu32.lib, Opengl32.lib, etc.), but cannot figure out how to
let the Java loader 'see' it (I still get the same error message). I've tried
numerous 3D/OpenGL web sites, but (obviously) have not found the answer I'm
looking for.

Another question: I would like to run the examples in 'software only' mode.
Is there anything special I need to do to make that be the case?

I'm running Java 1.3 on Win95NTsp4.

Thanks in advance.
import-bot (20211) [Avatar] Offline
#2
Re: UnsatisifiedLinkError
[Originally posted by rykowski]

I found the problem: I downloaded the Java3D code for the JDK, but not the JRE
(which I was using to run the examples). Everything seems to be working,
though I'm still confused as to where the OpenGL files fit in (are they even
being used?)
import-bot (20211) [Avatar] Offline
#3
Re: UnsatisifiedLinkError
[Originally posted by author]

If by "OpenGL files" you are refering to the drivers for your card, those get
installed in NT the same as any driver, and are not explicitely referenced by
Java. If you mean the OpenGL version of Java 3D, the distribution will
contain a .dll and jar files different from the x3d version.

What you have run into is one of the little j3d gremlins. The jdk install
generally only works for development, whereas the runtime install only works
for runtime use. Unless you know which files to copy from one to the other
install area, you generally have to install both of them to do both
development and runtime work. Supposedly this will be fixed in some future
release of j3d.

Glad you like the book.

--jon

> I found the problem: I downloaded the Java3D code for the JDK, but not the JRE
> (which I was using to run the examples). Everything seems to be working,
> though I'm still confused as to where the OpenGL files fit in (are they even
> being used?)