[ILUG] Re: Installing software on Linux (Specifically Fedora core 3)
Joseph Kiniry
kiniry at acm.org
Sun Mar 20 13:01:56 GMT 2005
David,
--On 20 March, 2005 11:10:56 +0000 David Jamison
<david.jamison1 at ntlworld.com> wrote:
> Thanks to everyone who replied and Im having an attempt to use eclipse
> which seems to do all I want.
>
> However it isnt working and there does not seem to be install
> documentation on the Eclipse site having said that the install looks as
> if it should be a breeze.
>
> I did fine the following
> http://www.fedoraforum.org/forum/showthread.php?t=44644&highlight=eclipse
>
> Following this all through I end up with the following
>
> Eclipse is installed at /opt/eclipse
> JDK1.5.0-02 is installed at /usr/java
>
> then the lines from james_in_denvers final post becomes
>
> "export JAVA_HOME=/usr/java/jdk1.5.0-02"
> "export PATH=$JAVA_HOME/bin"
This is wrong. You have just overridden your PATH completely, rather than
extending it to include a new element. It should read
export PATH=$JAVA_HOME/bin:$PATH
and immediately afterwards typing "java -version" should read something like
secure:java# /usr/java/jdk-1.5/bin/java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
> When I issue java -version I get
> libgcj-java-placeholder.sh
>
> This script is a placeholder for the /usr/bin/java
> master link required by jpackage.org conventions. libgcj's
> rmiregistry, rmic and jar tools are now slave symlinks to these
> masters, and are managed by the alternatives(8) system.
>
> This change was necessary because the rmiregistry, rmic and jar tools
> installed by previous versions of libgcj conflicted with symlinks
> installed by jpackage.org JVM packages.
>
> gij (GNU libgcj) version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Fedora Core ships with gcj as its "native" built-in Java.
<http://gcc.gnu.org/java/>
It is not (yet, publicly) capable of running Eclipse.
> Then when I try to fire up eclipse from the terminal I get a pop up
> window saying
>
> A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be
> available to run Eclipse. No Java virtual mchine was found after
> searching the following locations
>
> /opt/eclipse.jre/bin/java
> 'java' in your current path
Since you didn't set JAVA_HOME or your PATH properly, so Eclipse is looking
in all the wrong places for your Java install.
> Obviously it wouldnt be found in /opt or .jre/bin/java as I have jdk but
> should the two lines in the profile not add the jdk to the path??
>
> Im thinking that this is a path or link/symlink issue but not sure how to
> proceed.
While you have installed Sun's JDK, the links relating to Java in /usr/bin
still point to your default install. These links are managed by the
"alternatives" system of Fedora. See the man page alternatives(1) for more
information.
If you fix your PATH to ensure that the first "java" discovered is, in
fact, part of your JDK and not part of gcj, then everything with Just Work.
Note that you need to have these settings for JAVA_HOME and PATH in your
shell's startup file (e.g., .bash_profile or .bashrc) so that the settings
are not only permanent, but inherited by your window manager, etc. This
means that you can then setup a desktop/menubar shortcut to Eclipse, e.g.
> It is interesting to note that Eclipse is going to be built into FC4!
It is? I hadn't heard that.
Good luck in your continual quest to learn more about Linux!
Joe
--
Joseph R. Kiniry
Dept. of Computer Science, University College Dublin
http://secure.ucd.ie/
More information about the ILUG
mailing list