Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I had the Gnu Java installed on my RHEL5.0 machine. java -version displays the following: java version "1.4.2" gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42) I tried ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    13

    Two java compilers installed on same linux machine

    Hi,

    I had the Gnu Java installed on my RHEL5.0 machine. java -version displays the following:
    java version "1.4.2"
    gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42)

    I tried installing SUNJava2-SDK-1.6.0_05-0.i386.rpm on the same server , which got installed. However, the java -version still shows the old GNU liggcj version only.

    How will I force my code to be compiled using the Sun Java Compiler ?
    Kindly suggest .

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    Hi. You ca use update-alternatives to change the default java. The example here may help.

  3. #3
    Just Joined!
    Join Date
    Jan 2009
    Posts
    13
    This worked for me without any hassles..Thanks a ton ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...