Trying to get Java working on Fedora Core 3

doodpants_at_mailinator.com
Date: 03/30/05


Date: 30 Mar 2005 07:07:36 -0800

I have a Java application, which I've developed for my company using
Java 1.4.2, packaged as an executable .jar file. It works fine on
Windows and Mac OS X. I just installed Fedora Core 3, and so far have
been unsuccessful getting this app to run on it. I'm pretty much a
Linux newbie, and I could really use some help. (In general I wouldn't
call myself a Unix "newbie", but I'm not exactly a power user either.)

Simply executing
> java -jar MyApp.jar
resulted in the following error:

Exception in thread "main" java.lang.NoSuchMethodError: method
javax.swing.JTree.getSelectionModel was not found.

followed by a stack trace. This baffled me, since according to Sun's
docs, this method existed at least as far back as Java 1.3, and is
still present in 1.5. Now, it turns out that in FC3, the "java" command
is actually an alias to "gij", which I guess is some GNU version of
Java which is not 100% compatible with Sun's Java. (I verified this by
trying another Java app on it, which did run, but in a horribly broken
fashion.)

So I decided I should just install Sun's Java myself. I downloaded
j2re-1_4_2_07-linux-i5686.bin, su'd to root, unpacked it into /opt, and
added /opt/j2re1.4.2_07/bin to the front of my PATH. Now when I execute

> java -jar MyApp.jar
I get:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
/opt/j2re1.4.2_07/lib/i386/libawt.so: libXp.so.6: cannot open shared
object file: No such file or directory

So that's where I am now. Has anyone successfully gotten Java installed
on Fedora Core 3, and is there a simple "recipe" I can follow for
success? Is it a simple matter of getting this libXp.so.6 from
somewhere and installing it on my machine? If so, how do I do this?

Thanks in advance for any help.



Relevant Pages