Jump to content

trying to run eclipse... errors out.... [solved]


Recommended Posts

Hi guys,

 

I am trying to get my eclipse to run for the last three days, but it errors out no matter what I do. I searched through many sites, trying to see what solution might fix this. So far, not a single solution has worked, and I am posting here as my last resort. please help.

 

 

this is the error it currently displays:

 

JVM terminated. Exit code=1

/usr/bin/java

-jar startup.jar

-os linux

-ws gtk

-arch x86

-launcher /usr/bin/eclipse

-name Eclipse

-showsplash 600

-exitdata b0005

-vm /usr/bin/java

-vmargs

-jar startup.jar

 

Solutions I have tried:

 

1: I reinstalled eclipse, jdk, and jre, but to no avail!

2: I edited my bash files (look below), but to no avail!

 

Temporary Solution i know that works:

 

eclipse does run if I use this command:

 

gij -jar /usr/share/eclipse/startup.jar

 

but problem with that is, it takes approx 5 mins to load, and I would rather prefer a permenent solution.

 

here is how my .bash* files look like

 

.bashrc found when typed ~/.bashrc in Konsole

 

# .bashrc

export PATH=/usr/java/jdk1.5.0_08/bin:$PATH
export JAVA_HOME="/usr/java/jdk1.5.0_08"
export CLASSPATH=.:/usr/java/jdk1.5.0_08
PATH=$PATH:/usr/local/eclipse/eclipse

#PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME ENV PATH

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

 

my .bashrc~ file: found when typed ~/.bashrc~ in Konsole

# .bashrc

export PATH=/usr/java/jdk1.5.0_08/bin:$PATH
export JAVA_HOME="/usr/java/jdk1.5.0_08"
export CLASSPATH=.:/usr/java/jdk1.5.0_08
PATH=$PATH:/usr/local/eclipse/eclipse

#PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME ENV PATH

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

 

my .bash_profile: found when typed ~/.bash_profile

 

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

mesg n

#export JAVA_HOME=/usr/java/jdk1.5.0_08 
#PATH=$JAVA_HOME/bin:$PATH

 

my .bash_profile~: found when typed ~/.bash_profile~

 

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

mesg n

export JAVA_HOME=/usr/java/jdk1.5.0_08 
PATH=$JAVA_HOME/bin:$PATH
PATH=$PATH:/usr/local/eclipse/eclipse

 

as you can see, I commented some lines in the files above... all this, and eclipse still does not work. Someone Please help.

 

-LR

 

 

[moved from Software by spinynorman - welcome aboard :)]

Edited by linuxrush
Link to comment
Share on other sites

Welcome aboard! mub-beer.gif

 

Two questions - does java run normally, if you just type "java" does it come up with a meaningful java message? Do other java applications run ok? It's a little odd that the error message includes "/usr/bin/java" when I'm assuming that doesn't exist. And "/usr/bin/eclipse" when elsewhere it says "/usr/local/eclipse/eclipse"...

 

Secondly, how are you starting eclipse? Just with "eclipse" or with other parameters too?

 

Oh, and to make things a little clearer, it would be useful to know which distro you're using, and which version of eclipse too.

Link to comment
Share on other sites

Hello neddie,

 

Welcome aboard!

Thank You, delighted to be here. Hopefully, I can solve my problems, and help users along the way too!

 

ok, now, your queries:

 

does java run normally, if you just type "java" does it come up with a meaningful java message?

Yes, I am sure it runs normally. here's the output when i typed

java

inside the Konsole:

 

[linuxrush@localhost ~]$ java

Usage: java [-options] class [arg1 arg2 ...]

(to run a class file)

or java [-options] -jar jarfile [arg1 arg2 ...]

(to run a standalone jar file)

 

where options include:

-help print out this message

-version print out version number and copyright information

-showversion show version number and copyright and continue

-cp -classpath <jar/zip files and directories separated by :>

locations where to find application classes

-verbose[:class|gc|jni]

:class print out information about class loading, etc.

:gc print out results of garbage collection

:jni print out native method dynamic resolution

-D<name>=<value> set a system property

-X show help on non-standard options

 

Do other java applications run ok?

Don't know. Havent' tried any other app that I know uses Java... Give me an example, and I will execute that program and see if it runs.

 

It's a little odd that the error message includes "/usr/bin/java" when I'm assuming that doesn't exist.

If you mean a directory, then yes you are right. "java" directory does not exist under /usr/bin.

However, if you mean a file, then yes it does exist. please look at the screenshot below of my /usr/bin/ folder

 

I have highlighed everything that said "java"

 

screenshotjz1.th.png

 

And "/usr/bin/eclipse" when elsewhere it says "/usr/local/eclipse/eclipse"...

Yes, there is no directory called "eclipse" under /usr/bin/

There is, however a Executable File (Link) that points to: /usr/share/eclipse/eclipse

 

I am starting eclipse using the kmenu.

When I look at the kmenu entry of eclipse i see this in the "COMMAND" entry:

eclipse

hence, i am starting eclipse with just "eclipse" and with no other parameters.

 

Oh, and to make things a little clearer, it would be useful to know which distro you're using, and which version of eclipse too.

Distro: I am using Mandriva Free 2007

Eclipse: Eclipse Version 3.2

Below is a screenshot that i took of rpmdrake.

it shows everything installed for keyword "eclipse"

 

eclipseov2.th.png

 

And one more:

Below is a screenshot of rpmdrake:

it shows everything installed for keyword "java"

javamp0.th.png

 

 

Please let me know if more information is needed. Thank you for your help so far, neddie.

 

-LR

Link to comment
Share on other sites

It could be that your system is confused whether it's using java 1.4.2 or java 1.5. You seem to have both installed, and maybe it's trying to use the wrong classpath / JAVA_HOME for the other version.

If you do a "java -version", do you see 1.4.2 or 1.5 ? And if you look at the link in /usr/bin, does it point to /usr/java/jdk1.5.0_08 or something with 1.4.2 in the path?

 

If you have both /usr/bin and /usr/java/jdk1.5.0_08/bin in your path, then it will depend on the order they occur as to which gets called, which might get confusing.

It's possible to have both 1.4 and 1.5 installed at the same time, but it needs to match - the JAVA_HOME and the CLASSPATH should match the JVM which is running.

Link to comment
Share on other sites

Hi neddie,

 

when i do:

which java
java -version

in the Konsole, i get the following:

 

[linuxrush@localhost ~]$ which java

/usr/bin/java

[linuxrush@localhost ~]$ java -version

java version "1.4.2"

JamVM version 1.4.3

Copyright © 2003-2006 Robert Lougher <rob@lougher.org.uk>

 

This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2,

or (at your option) any later version.

 

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

[linuxrush@localhost ~]$

 

And if you look at the link in /usr/bin, does it point to /usr/java/jdk1.5.0_08 or something with 1.4.2 in the path?

 

the file: "java" under /usr/bin is "Executable File (Link)"

and it points to: /etc/alternatives/java

 

in "/etc/alternatives/" folder, there is no folder named "java"

there is however an "Executalbe File (Link), which points to: "/usr/lib/jvm/java-1.4.2-jamvm-1.4.2.0/jre/bin/java"

 

this is very confusing. where to go from here, neddie?

 

-LR

Link to comment
Share on other sites

jamvm, very interesting! Never heard of it! :D

 

I've never used this beast so I can't guarantee it'll work with eclipse, but for sure I'd get rid of your references to the 1.5 classpaths. What do you see if you type

echo $CLASSPATH
echo $JAVA_HOME
echo $PATH

? Try removing these environment settings like this

export $CLASSPATH=
export $JAVA_HOME=
export $PATH=/usr/bin

and then run eclipse with "eclipse" and see if that gets you any further.

 

I guess you tried installing a 1.5 jre / jvm at sometime on this system, right?

Link to comment
Share on other sites

Hello neddie,

 

I get nothing when i type:

echo $CLASSPATH
echo $JAVA_HOME

 

However, i get something when i type

echo $PATH

 

here's a complete output from Konsole:

 

[linuxrush@localhost ~]$ echo $CLASSPATH

 

[linuxrush@localhost ~]$ echo $JAVA_HOME

 

[linuxrush@localhost ~]$ echo $PATH

/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt3//bin:/home/linuxrush/bin:/usr/lib/qt3//bin

[linuxrush@localhost ~]$

 

Try removing these environment settings like this...

and then run eclipse with "eclipse" and see if that gets you any further.

 

I will do that as soon as I finish writing this reply ;)

 

I guess you tried installing a 1.5 jre / jvm at sometime on this system, right?

 

yes, that is correct. I shouldn't have?

 

 

let me go try what you said.

-LR

Edited by linuxrush
Link to comment
Share on other sites

hi neddie,

i changed my bash files:

~/.bashrc ~/.bashrc~

files to have the following:

 

bashrc

# .bashrc

 

PATH=$PATH:/usr/local/eclipse/eclipse

 

# PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin

 

ENV=$HOME/.bashrc

USERNAME="root"

export USERNAME ENV PATH

 

# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi

 

bashrc~

 

# .bashrc

 

PATH=$PATH:/usr/local/eclipse/eclipse

 

# PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin

 

ENV=$HOME/.bashrc

USERNAME="root"

export USERNAME ENV PATH

 

# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi

 

~/.bash_profile and ~/.bash_profile~

 

bash_profile

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

mesg n

 

bash_profile~

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

 

mesg n

 

notice that i deleted the export lines from bashrc and bashrc~ files

 

even after doing this, and running "eclipse" command in Konsole did not solve the problem.

 

do my bash files (all four of them) look right? and do I have to reboot everytime i change my bash files? or just logging out (CTRL+ALT+BckSpace) will do?

 

-LR

Link to comment
Share on other sites

Hi neddie,

 

I am very excited to tell you that my problem is resolved!

 

What I did to get it to work:

 

I changed my bashrc file to look like this:

 

# .bashrc

 

JAVA_HOME=/usr/java/jdk1.5.0_08

PATH=$PATH:/usr/java/jdk1.5.0_08/bin

 

# PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin

 

ENV=$HOME/.bashrc

USERNAME="root"

export USERNAME ENV PATH

 

# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi

 

[NOTICE THE 3rd AND 4th LINES WHERE I DEFINE THE JAVA_HOME AND PATH]

 

then I created a symlink in "usr/bin/"

This i did by doing the following in Konsole

cd /usr/bin/

 

this made /usr/bin as my active directory.

From here, I created the symlink using the following command:

 

ln -s /usr/java/jdk1.5.0_08/bin/java java

 

And restarted my computer.

 

All is well, i Created helloworld app, just to test everything and all worked good ;)

 

Thank you very much for all your help, neddie!! :)

 

-LR

Link to comment
Share on other sites

w00t! :woot:

 

Well I guess the way you solved it is to use the 1.5 jre for everything - maybe there was a problem with the jamvm or maybe it was just the inconsistencies with the JAVA_HOME etc. But looks like you've solved it - nice one! :thumbs:

 

Just as an aside, you said you had four files - the files with a squiggle ~ at the end of the filename are just backup copies - some editors save the previous contents as filename~ automatically (vi does this, for example). The old copy stays there in case you want to undo changes, but you don't have to edit it because it won't be read by the system stuff.

 

Anyway, congrats for fixing the problem!

Link to comment
Share on other sites

Hi neddie,

 

Well I guess the way you solved it is to use the 1.5 jre for everything

Yes, i decided to go with verison 1.5 for everything. is this wrong? should it be a different version?

 

Just as an aside, you said you had four files - the files with a squiggle ~ at the end of the filename are just backup copies - some editors save the previous contents as filename~ automatically (vi does this, for example). The old copy stays there in case you want to undo changes, but you don't have to edit it because it won't be read by the system stuff.

 

Ahh. now i understand.

 

Anyway, congrats for fixing the problem!

Thanks neddie.

 

-LR

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...