Re: Java and Eclipse

From: Lenard (lenard_at_127.0.0.1)
Date: 11/21/05

  • Next message: vishwaspatki: "Is there any way of making getitimer & setitimer functions process specific."
    Date: Mon, 21 Nov 2005 11:20:16 GMT
    
    

    Joseph wrote:

    > Got Fedora 4 installed and then installed a better version of Java (big
    > mistake). Now Eclipse dos not work and come with error message in
    > "/root/workspace/.metadata/.log". the message saying it can not find Java
    > or the link dos not exist. Well, I have searched for Java on the root and
    > up and got back tons of Java, Java files and directory that makes me very
    > confused to how to un-install and re-install a software under Linux. I
    > tried to go to add/remove program and tried to remove java so I can
    > re-install it but give me an error and it seem like it can not handle
    > removing something that is maybe missing.
    >
    > If any one of you can help me figure this out without having to re-install
    > Linux again that would be truly appreciated.

    Reconfiguring Fedora Core 4's default Java configuration

    This is done as root or equivalent.

    First remove /var/lib/alternatives/java file by typing;

    rm /var/lib/alternatives/java

    When asked press the 'y' key,

    Now to create the new (corrected) alternatives file for java type
    the following example commands as root (the first two lines are each one
    long line with a space after the first line and the rest of the command);

    /usr/sbin/alternatives --install /usr/bin/java
    java /usr/lib/jvm/jre-1.4.2-gcj/bin/java 1

    /usr/sbin/alternatives --install /usr/bin/java
    java /usr/java/j2re1.5.0_05/bin/java 2

    /usr/sbin/alternatives --config java

    You should now see for example:

    There are 2 programs which provide 'java'.

      Selection Command
    -----------------------------------------------
       1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
    *+ 2 /usr/java/j2re1.5.0_05/bin/java

    Enter to keep the current selection[+], or type selection number:

    Type: <choose 1 or 2>

    In the example above java is already configured [*+ 2] to use Sun's Java, no
    changes are needed, just press the Enter key here.

    If you have been following the instructions then you should have
    the same results (version numbers may be sightly different).

    Now type; /usr/sbin/alternatives --display java

    You should see for example;

    java - status is manual.
    link currently points to /usr/java/j2re1.5.0_04/bin/java
    /usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1
    /usr/java/j2re1.5.0_05/bin/java - priority 2
    Current `best' version is /usr/java/j2re1.5.0_05/bin/java.

    Next you might want to create (or edit) /etc/profile.d/java.sh
    file, example below;

    export JAVA_HOME="/usr/java/jre1.5.0_05/bin"
    export JAVA_PATH="$JAVA_HOME"
    export PATH="$PATH:$JAVA_HOME"

    When done creating or editing the file type;

    source /etc/profile.d/java.sh

    Now any user root or other wise should be able to use the command;

    which java

    and the results should read something like;

    /usr/java/jre1.5.0_05/bin/java

    Also any user root or otherwise should be able to use the command;

    java -version

    and the results should read something like;

    java version "1.5.0_05"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
    Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)

    That's it, all done.

    -- 
    "They that can give up essential liberty to obtain a little temporary
     safety deserve neither liberty nor safety."     -- B. Franklin, 1759
    

  • Next message: vishwaspatki: "Is there any way of making getitimer & setitimer functions process specific."

    Relevant Pages

    • Re: IE 6 Generating Error Message and close down
      ... and same error message was generated. ... It appears that the problem lies with the web site. ... Try going to the root site http://www.esd.gov.hk first and then navigating ... my settings to verify compatibility to their program using Java. ...
      (microsoft.public.windows.inetexplorer.ie6.browser)
    • Re: [opensuse] Java install ?
      ... What does the follow show when pasted into the command line? ... as root --) the following command: ... update-alternatives --config java ... # update-alternatives --config java ...
      (SuSE)
    • Re: NoClassDefFoundError:
      ... >I set it up in thinking that it would give informed error messages for java ... It's highly recommended that you learn how to use the java command ... before you start using an IDE. ... Specifically the error message looks like it's missing the name of the ...
      (comp.lang.java.programmer)
    • Re: Java problem
      ... symlinks pointing to the Java6 directory. ... you should be able to run whatever command that you wanted to run: ... you should _not_ have to be root. ... Usually a Java app is distributed as a jar file, ...
      (Fedora)
    • Re: A constructive debate: Eclipse or NetBeans?
      ... that Linux and command-line driven languages like OCaml are so much more ... That's because most people never learn to use a command line or a simple ... Trying to run other people's OpenGL-based Java demos from the web I find ... OpenGL). ...
      (comp.lang.java.softwaretools)