Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Eclipse with Java 6(Eclipse launches with Java 5 but not Java 6)
Eclipse with Java 6 [message #507804] Thu, 14 January 2010 17:48 Go to next message
Mark Mising name is currently offline Mark Mising nameFriend
Messages: 73
Registered: July 2009
Location: Ohio, USA
Member
I recently had to upgrade my application to use Java 6. I still have Java 5 installed in a separate location. The problem is that when Java 6 is on my PATH Eclipse gives me an error, but my app and others run fine. Eclipse is only happy when Java 5 is in the PATH and Java 6 isn't.

AFAIK, Eclipse is not locked in to a particular version of Java. So if it works for Java 5, I would think it would also work for future versions as well (Java 6). I found nothing about this issue on the Eclipse web site. Is there a command-line switch which I need to tell Eclipse to expect Java 6?

Mark
Re: Eclipse with Java 6 [message #507817 is a reply to message #507804] Thu, 14 January 2010 19:01 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
Eclipse does work well with Java 6.

Deepak
Re: Eclipse with Java 6 [message #507890 is a reply to message #507804] Fri, 15 January 2010 01:55 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
"Mark" <Mark.Fenbers@noaa.gov> wrote in message
news:hinldm$bgo$1@build.eclipse.org...
>I recently had to upgrade my application to use Java 6. I still have Java
>5 installed in a separate location. The problem is that when Java 6 is on
>my PATH Eclipse gives me an error, but my app and others run fine. Eclipse
>is only happy when Java 5 is in the PATH and Java 6 isn't.
>
> AFAIK, Eclipse is not locked in to a particular version of Java. So if it
> works for Java 5, I would think it would also work for future versions as
> well (Java 6). I found nothing about this issue on the Eclipse web site.
> Is there a command-line switch which I need to tell Eclipse to expect Java
> 6?

Eclipse works fine with Java 6. What is the specific error you are getting?

By the way, you probably shouldn't be picking Java up off the path anyway.
It's best to specify the JRE explicitly, either in your eclipse.ini file or
on the command line.
Re: Eclipse with Java 6 [message #507891 is a reply to message #507890] Fri, 15 January 2010 01:56 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
"Walter Harley" <eclipse@cafewalter.com> wrote in message
news:hiohut$cvj$1@build.eclipse.org...
> "Mark" <Mark.Fenbers@noaa.gov> wrote in message
> news:hinldm$bgo$1@build.eclipse.org...
>>I recently had to upgrade my application to use Java 6. I still have Java
>>5 installed in a separate location. The problem is that when Java 6 is
>>on my PATH Eclipse gives me an error, but my app and others run fine.
>>Eclipse is only happy when Java 5 is in the PATH and Java 6 isn't.
>>
>> AFAIK, Eclipse is not locked in to a particular version of Java. So if it
>> works for Java 5, I would think it would also work for future versions as
>> well (Java 6). I found nothing about this issue on the Eclipse web site.
>> Is there a command-line switch which I need to tell Eclipse to expect
>> Java 6?
>
> Eclipse works fine with Java 6. What is the specific error you are
> getting?
>
> By the way, you probably shouldn't be picking Java up off the path anyway.
> It's best to specify the JRE explicitly, either in your eclipse.ini file
> or on the command line.

Also, I forgot to ask: what version of Eclipse are you using?
Re: Eclipse with Java 6 [message #507969 is a reply to message #507890] Fri, 15 January 2010 11:39 Go to previous messageGo to next message
Mark Mising name is currently offline Mark Mising nameFriend
Messages: 73
Registered: July 2009
Location: Ohio, USA
Member
I like the eclipse.ini or command-line idea. I edited the former and found nothing currently in there I can modify where a Java path is given, so what do I add to the file or command-line to specify this?

The error I'm getting occurs in a pop-up dialog right after the splash screen appears. It is the following:

JVM terminated. Exit code=-1
-Xms256M
-Xmx1024M
-XX:PermSize=256M
-XX:MaxPermSize=512M
-Djava.class.path=/usr/local/eclipse//plugins/org.eclipse.eq uinox.launcher_1.0.200.v20090520.jar
-os linux
-ws gtk
-arch x86
-showsplash /usr/local/eclipse//plugins/org.eclipse.platform_3.3.200.v20 0906111540/splash.bmp
-launcher /usr/local/eclipse/eclipse
-name Eclipse
--launcher.library /usr/local/eclipse//plugins/org.eclipse.equinox.launcher.gtk .linux.x86_1.0.200.v20090520/eclipse_1206.so
-startup /usr/local/eclipse//plugins/org.eclipse.equinox.launcher_1.0 .200.v20090520.jar
-product org.eclipse.epp.package.java.product
-vm /packages/jdk1.6.0_17/bin/../jre/lib/i386/client/libjvm.so
-vmargs
-Xms256M
-Xmx1024M
-XX:PermSize=256M
-XX:MaxPermSize=512M
-Djava.class.path=/usr/local/eclipse//plugins/org.eclipse.eq uinox.launcher_1.0.200.v20090520.jar

I am running Eclipse Galileo build 20090619-0625. I never had a problem with launching Eclipse for any version of Eclipse or Java before now, which is why this is so puzzling. I've been using Eclipse for years!

thanks for the help!

Mark
Re: Eclipse with Java 6 [message #507978 is a reply to message #507969] Fri, 15 January 2010 11:58 Go to previous messageGo to next message
Mark Mising name is currently offline Mark Mising nameFriend
Messages: 73
Registered: July 2009
Location: Ohio, USA
Member
Interestingly, I found the appropriate command-line option and I got Eclipse to work using Java 6 by specifying the full path of the java executable as an argument to the -vm option. I never had reason to use this option before. If I omit this option, then Eclipse will not launch if Java 6 is in the PATH.

I now consider this issue closed, but I will check back for replies in case anyone posts some comments about why Eclipse would fail without the -vm option and Java 6 in the PATH.

Mark
Re: Eclipse with Java 6 [message #510557 is a reply to message #507978] Wed, 27 January 2010 19:54 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 1/15/10 6:58 AM, Mark wrote:
> Interestingly, I found the appropriate command-line option and I got
> Eclipse to work using Java 6 by specifying the full path of the java
> executable as an argument to the -vm option. I never had reason to use
> this option before. If I omit this option, then Eclipse will not launch
> if Java 6 is in the PATH.
>
> I now consider this issue closed, but I will check back for replies in
> case anyone posts some comments about why Eclipse would fail without the
> -vm option and Java 6 in the PATH.

See http://wiki.eclipse.org/Eclipse.ini for official documentation (and
examples for several platforms) on how to do this.

Hope this helps,
Eric
Previous Topic:Possible to contribute an "editor factory" for specific resources?
Next Topic:Is Eclipse 3.6 GTK Hanuted? :)
Goto Forum:
  


Current Time: Thu Apr 25 11:57:53 GMT 2024

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

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

Back to the top