No GCJ, only Sun Java5: how??
martin.marcher at openforce.com
Wed Jan 10 09:42:03 UTC 2007
Am 09.01.2007 um 17:11 schrieb Ringo De Smet:
> I am running Ubuntu 6.10 and I am trying to install Tomcat 5.5 on
> Sun Java
> 5. I have installed the Sun Java5 packages (bin, jre, jdk, plugin)
> multiverse and I would now like to install Tomcat. My problem now
> is that
> every package management tool (apt, aptitude, synaptic) insists on
> installing gcj/gij stuff. I wonder why, since Tomcat 5.5 depends on
> kaffe, gcj or java2-runtime. java2-runtime is provided by the Sun
> Java5 jre
> package. Is there any way I can prevent the installation of gcj/gij
> update-java-alternatives didn't help me out here.
Personally I only tried installing java tomcat eclipse and alike
stuff only once or twice with apt-get so this may be very subjective.
Save yourself the hassle and just download sun's java from the
original download site as well as tomcat. I normally either
(depending on my needs) just unpack it to /opt/java-<version> /opt/
tomcat-<version> and symlink it to /opt/java /opt/tomcat (or whatever
package you use). After that I make sure that by _specifying the full
path_ (for symlinks thru /opt/java and direct thru /opt/java-
<version>) I can run java. If that's fine I used to add /opt/java to
the path variable but recently I started symlinking /opt/java/bin/*
to /usr/local/bin/ (then adding /opt/local/bin to the path if it
isn't there - I'm not exclusively using ubuntu so it depends on which
host I'm working).
With all that I can easily switch versions by just relinking /opt/
java to another /opt/java-<newversion>.
I've by now never bothered to use the debian /etc/alternatives
symlinks to do all that, reasons for that are:
a) I'm not exclusively using debian distros and my approach is by
usable on any distro with the same methods
b) I was just to lazy to get into the alternatives system deep enough
Also if you do it the way I described above:
* If you're new to linux there is a learning curve and it may not
work instantly, but once you figured it out you will never again have
problems with java (keep in mind this is all subjective).
* You can easily enable java in the browser by symlinking either
directly to a version or by linking to /opt/java the link to do that
would be: /opt/java/jre/plugin/i386/ns7/libjavaplugin_oji.so (hope
that's still right I don't use it any more since my desktop is now a
mac) just symlink that file to /usr/lib/mozilla/plugins (for all
users or in the plugins directory in you home for just your user)
PS: paths for the java plugin may be wrong but the general directions
More information about the ubuntu-users