Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » error launching eclipse 3.4, ClassNotFoundEx
error launching eclipse 3.4, ClassNotFoundEx [message #215437] Sun, 15 June 2008 22:50 Go to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

I get the message 'Could not create the view org.eclipse .....'
in the project explorer and when I try to go to the welcome window.

This is probably because it is trying to use the gcj java instead of the
jave I have installed. I want to add the JVM 1.6 which is in /usr/lib to
the
installed runtimes (which I think you do by going to Window->Preferences),
but I can't even get to any option to do that.
Any help would be greatly be appreciated. Thanks,

Adam
Re: error launching eclipse 3.4, ClassNotFoundEx [message #215469 is a reply to message #215437] Mon, 16 June 2008 11:53 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Adam Posner wrote:
> I get the message 'Could not create the view org.eclipse .....'
> in the project explorer and when I try to go to the welcome window.
>
> This is probably because it is trying to use the gcj java instead of the
> jave I have installed. I want to add the JVM 1.6 which is in /usr/lib to
> the
> installed runtimes (which I think you do by going to Window->Preferences),
> but I can't even get to any option to do that.
> Any help would be greatly be appreciated. Thanks,
>
> Adam
>

I believe you need to change the Java Eclipse is running on, not the
runtime projects will use, which is what you control via
Window->Preferences. I recommend modifying the eclipse.ini file in the
folder where you installed eclipse. Just above the line containing
"-vmargs" insert two lines. The first one should contain "-vm" and the
second one the path to the Java executable you wish to run Eclipse with.
See Help -> Help Contents -> Workbench User Guide -> Tasks -> Running
Eclipse for info about Eclipse startup arguments. Remember that when
placed in the eclipse.ini file, each space separated argument needs to
be on its own line.

Cheers,
Larry
Re: error launching eclipse 3.4, ClassNotFoundEx [message #215892 is a reply to message #215469] Sun, 22 June 2008 22:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

Thanks for the reply. I set the -vm option in eclipse.ini to my jdk
home directory - /usr/lib/jdk.

I also put these 3 lines at the top of my /etc/eclipse/java_home :
(The first one is just a symlink to the 2nd)

/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-6-sun-1.6.0.00
/usr/lib/jdk

I have $JAVA_HOME /etc/environment set to /usr/lib/java-6-sun

What's a little confusing though, is that eclipse tells you have to have
$JAVA_HOME set to the root directory of your jdk installation, which is
/usr/lib/jdk(there's also a jre in there). But the jvm is in the above
directory, which is where I thought $JAVA_HOME was supposed to be set to.

Anyway I ended up having to install the sun-java6-jdk from the
repositories and
that got the eclipse3.2 that I had previously installed via apt-get
working.

The eclipse 3.4 R3 that I downloaded the binary from the eclipse site still
doesn't work though, and I'm not sure what to do at this point to get that
one working. I may just have to use the 3.2 version for now until they get
a newer version in the repositories. I would love to have the latest
version working but I've spent a lot of time on it already and can't see
the benefit in spending much more time on it at this point. I may come
back to it later.
If anyone has any ideas I'd still like to hear them, thanks.
Re: error launching eclipse 3.4, ClassNotFoundEx [message #215914 is a reply to message #215892] Mon, 23 June 2008 16:58 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Adam Posner wrote:
> Thanks for the reply. I set the -vm option in eclipse.ini to my jdk
> home directory - /usr/lib/jdk.

The -vm option needs to point to the Java executable, not a directory,
in the eclipse.ini. This allows you to specify exactly which Java that
Eclipse should run with, rather that monkeying with the system to
achieve the same thing. The first time you start Eclipse, it will
automatically create a Java Runtime which uses the same Java that
Eclipse is running on. However, this Java Runtime is a completely
separate entity. There is no way using Preferences to affect the Java
Eclipse uses to run.

>
> I also put these 3 lines at the top of my /etc/eclipse/java_home :
> (The first one is just a symlink to the 2nd)
>
> /usr/lib/jvm/java-6-sun
> /usr/lib/jvm/java-6-sun-1.6.0.00
> /usr/lib/jdk
>
> I have $JAVA_HOME /etc/environment set to /usr/lib/java-6-sun
>
> What's a little confusing though, is that eclipse tells you have to
> have $JAVA_HOME set to the root directory of your jdk installation,
> which is
> /usr/lib/jdk(there's also a jre in there). But the jvm is in the above
> directory, which is where I thought $JAVA_HOME was supposed to be set to.
>
> Anyway I ended up having to install the sun-java6-jdk from the
> repositories and
> that got the eclipse3.2 that I had previously installed via apt-get
> working.
>
> The eclipse 3.4 R3 that I downloaded the binary from the eclipse site still
> doesn't work though, and I'm not sure what to do at this point to get
> that one working.

If you specify the Java executable in eclipse.ini, does it still not work?

Cheers,
Larry

> I may just have to use the 3.2 version for now until
> they get a newer version in the repositories. I would love to have the
> latest version working but I've spent a lot of time on it already and
> can't see the benefit in spending much more time on it at this point. I
> may come back to it later.
> If anyone has any ideas I'd still like to hear them, thanks.
>
>
Re: error launching eclipse 3.4, ClassNotFoundEx [message #215971 is a reply to message #215914] Tue, 24 June 2008 03:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

It looks like I had the correct executable but had the arguments in
eclipse.ini in the wrong order:

-showsplash
org.eclipse.platform
-vm
/usr/lib/jdk/bin/java
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m

All I did was move the -vmargs from above the -vm arguments to below and
it launched correctly. (I got an error but that was undoubtedly related to
having
2 versions of eclipse running at the same time, the older version that I
installed using apt-get (3.2.2) , and the newer (3.4 RC3) that I
downloaded from the eclipse site to my home directory.)

Thanks a lot for your help.

PS: By the way,is there any reason to switch from the Ganymede RC3 version
that I have now to the official release version that will be coming out in
a couple of days ?
Re: error launching eclipse 3.4, ClassNotFoundEx [message #215989 is a reply to message #215971] Tue, 24 June 2008 12:49 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Adam Posner wrote:
> It looks like I had the correct executable but had the arguments in
> eclipse.ini in the wrong order:
>
> -showsplash
> org.eclipse.platform
> -vm
> /usr/lib/jdk/bin/java
> -vmargs
> -Xms40m
> -Xmx512m
> -XX:MaxPermSize=256m
>
> All I did was move the -vmargs from above the -vm arguments to below and
> it launched correctly. (I got an error but that was undoubtedly related
> to having
> 2 versions of eclipse running at the same time, the older version that I
> installed using apt-get (3.2.2) , and the newer (3.4 RC3) that I
> downloaded from the eclipse site to my home directory.)
>
> Thanks a lot for your help.
>
> PS: By the way,is there any reason to switch from the Ganymede RC3 version
> that I have now to the official release version that will be coming out
> in a couple of days ?
>

Actually, the -vmargs and the arguments that follow need to be last.
The -vm needs to be above -vmargs to have an effect. If the -vm
argument follows -vmargs, it gets swallowed as program arguments and is
probably ignored. Thus, your original order was correct. To see what
Java you are running, execute Help -> About Eclipse Platform (or About
Eclipse SDK) -> Configuration Details. In the displayed System
properties, properties like "java.home", "java.endorsed.dirs", and
"java.version" will provide an indication of what Java Eclipse is
running on.

Also, I assume you are using different workspaces for the different
versions of Eclipse. Is this the case?

Cheers,
Larry
Previous Topic:2 Questions for faceted project wizard.
Next Topic:Eclipse fails to produce a working webapp
Goto Forum:
  


Current Time: Fri Apr 26 04:46:59 GMT 2024

Powered by FUDForum. Page generated in 0.03776 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top