Linux jar file not portable to Windows

Q

Q&Z

I have an application that I have developed on a Linux box. When I
create the jarfile and attempt to execute it in Windows, I get the
following error:

java.lang.NoClassDefFoundError: sun/awt/X11GraphicsDevice at
javax.media.j3d.GraphicsConfigTemplate3D

X11, of course, is a reference specific to Linux. I know, however, that
I should be able to simply run the jar file on Windows without having to
first recompile the entire application. In fact, I have another Windows
box at work where I did just that: When I transferred the jar file to
this machine, it worked without a problem. Same jar file. Same OS
(Windows XP). So I'm thinking that there must be some sort of
environmental problem on the box that will not run the application.
I've checked that my environment variables point to both the Java 3D
libraries, and the rt.jar file on the Windows box. Does anyone else
have any suggestions? This just shouldn't be hard, but I'm beating my
head against the wall, here.

Thanks in advance for any help,
Q&A
 
S

Steve Sobol

Q&Z said:
I've checked that my environment variables point to both the Java 3D
libraries, and the rt.jar file on the Windows box. Does anyone else
have any suggestions? This just shouldn't be hard, but I'm beating my
head against the wall, here.

Aren't the Java3D libraries platform-specific? Did the port that work involve
Java3D? http://java.sun.com/products/java-media/3D/java3d-install.html seems to
indicate that different Java3D libraries are required for each platform.

(And doesn't include Linux, which is odd.)

--
JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
Steven J. Sobol, Geek In Charge / (e-mail address removed) / PGP: 0xE3AE35ED

"The wisdom of a fool won't set you free"
--New Order, "Bizarre Love Triangle"
 
R

Roland

Q

Q&A

I thought I'd post an answer to my question in case someone else
encounters this problem.

Turns out that my problem was apparently caused by my use of a "Windows"
version of Java instead of the Sun version that I had downloaded
earlier. Once I pointed to the correct Java version, the Linux-
built .jar file worked just fine under Windows on my home machine, and I
didn't have to recompile the app. Quite a relief because rebuilding on
another platform is a bear.

Thanks for the replies,
Q&A
p.s.: To the repliers:
1. Yup. I was beginning to think, as well, that my work machine was
simply magic and that Java 3D just simply wasn't portable between
platforms. Fortunately, this was apparently not the case. Learned
something new.
2. Yes. I've been coding with the Blackdown port of Java3D with
success. I was starting to wonder once I had this porting problem, but
now that seems to be fixed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top