LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Problem trying to run Eclipse for the first time (https://www.linuxquestions.org/questions/linux-desktop-74/problem-trying-to-run-eclipse-for-the-first-time-503290/)

s0n|k 11-20-2006 10:18 AM

Problem trying to run Eclipse for the first time
 
I get an Error of "JVM TERMINATED. Exit code =1" in /usr/bin/java

RHEL4

What I've done:


I downloaded the JRE 1.4.2.13 from sun. I installed it by setting the proper permission and doing a ./filename. I accepted the EULA and let it install. I then rebooted. Next I downloaded Eclipse 3.1.0 which is targeted to run on J2RE SE 1.4 which I downloaded. I then double clicked the executable file. I also tried doing a ./eclipse. I then get the same error when trying to open the file both ways.What am I not doing?

reddazz 11-20-2006 10:28 AM

You could be running gcj instead of Sun java. What is the output of doing,
Code:

$java -version

s0n|k 11-20-2006 11:46 AM

java version "1.4.2"
gcj (GCC) 3.4.3 20041212 Red Hat 3.4.3-9.EL4

Why is not detecting Sun's Java?

reddazz 11-20-2006 11:56 AM

Create a script called java.sh and put the code below. Place the script in /etc/profile.d
Code:

export JAVA_HOME=/usr/java/jdk1.6.0
export MANPATH=$JAVA_HOME/man:$MANPATH
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

Make sure you edit the paths so that they match your own version of java and make it executable. After that, logout and back in again or do "source /etc/profile" and the sun java version should be detected before GCJ. If you have OpenOffice installed, then Redhat and derivatives insist on installing GCJ.

s0n|k 11-20-2006 12:09 PM

Awesome! Thanks for the help. Where do I place this script?

s0n|k 11-20-2006 12:13 PM

One more question. The line:

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

I don't have a /jre folder in my java folder, so can I just do

export PATH=$JAVA_HOME/bin:$JAVA_HOME/bin:$PATH

reddazz 11-20-2006 12:17 PM

The script should go in /etc/profile.d. You can remove the jre section if you don't have it, but I have never seen a java directory without the jre subdirectory.

s0n|k 11-20-2006 12:25 PM

That worked! I owe you one.


Thanks


All times are GMT -5. The time now is 01:43 AM.