Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Problems getting eclipse to recognize JDK(Problems with JDK and eclipse)
Problems getting eclipse to recognize JDK [message #655515] Mon, 21 February 2011 14:22 Go to next message
Jackie Gleason is currently offline Jackie GleasonFriend
Messages: 6
Registered: July 2009
Junior Member
Ok start off with my environment is as follows

x64 with Ubuntu 10.10 installed using eclipse helio.

I try to start up eclipse and I get the following

"Eclipse is running in a JRE, but a JDK is required Some Maven plugins may not work when importing projects or updating source folders."

I tried adding the -vm argument to my eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
-vm 
/usr/lib/jvm/java-6-sun/bin/javaws
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m


But that doesn't seem to work and when I try to pass the argument manually (/dir/eclipse/eclipse -vm /path/to/jdk/javaw) it acts like it is an invalid argument. Any help would be great!

Thanks

Jackie
Re: Problems getting eclipse to recognize JDK [message #655523 is a reply to message #655515] Mon, 21 February 2011 14:40 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

If what you've pasted in here is accurate, then the first problem is
that you have put the argument to -vm on the same line. Oddly,
eclipse.ini doesn't support that. You must separate them.

Second, in my experience, it's best to download and install a separate
JDK from Sun so you're always in control of your toolstack.

My eclipse.ini has

-vm
/home/russ/dev/jdk1.6.0_24/bin/java

However, what you're doing might work fine. I'm not sure why you'd use
javaws instead of java. Check out http://wiki.eclipse.org/Eclipse.ini





On 2011.02.21 7:22, Jackie Gleason wrote:
> Ok start off with my environment is as follows
>
> x64 with Ubuntu 10.10 installed using eclipse helio.
>
> I try to start up eclipse and I get the following
>
> "Eclipse is running in a JRE, but a JDK is required Some Maven plugins
> may not work when importing projects or updating source folders."
>
> I tried adding the -vm argument to my eclipse.ini
>
> -startup
> plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
> --launcher.library
> plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1. R36x_v20100810
> -product
> org.eclipse.epp.package.jee.product
> --launcher.defaultAction
> openFile
> -showsplash
> org.eclipse.platform
> --launcher.XXMaxPermSize
> 256m
> --launcher.defaultAction
> -vm /usr/lib/jvm/java-6-sun/bin/javaws
> openFile
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -XX:MaxPermSize=256m
> -Xms40m
> -Xmx512m
>
> But that doesn't seem to work and when I try to pass the argument
> manually (/dir/eclipse/eclipse -vm /path/to/jdk/javaw) it acts like it
> is an invalid argument. Any help would be great!
>
> Thanks
>
> Jackie
Re: Problems getting eclipse to recognize JDK [message #655524 is a reply to message #655523] Mon, 21 February 2011 15:13 Go to previous messageGo to next message
Jackie Gleason is currently offline Jackie GleasonFriend
Messages: 6
Registered: July 2009
Junior Member
Thanks for your response, I did try putting it on another line. From what I can tell the difference between using Java and JavaWs has something with it acting like a daemon instead of a process. I don't remember all the reasons I just remember I researched it and supposedly it is the proper way.

So I guess the only option I have left is to try to install straight from Oracle as you suggested, but to be honest I have little faith this will work (I have looked and the install directory looks to be set up correctly).

I thought this might have had something to do with the facets on my project (it was set to 1.5) I tried changing all these to the 1.6 JDK but still no dice.

Any other idea?

Current Eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
-vm 
/usr/lib/jvm/java-6-sun/bin/javaws
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m

[Updated on: Mon, 21 February 2011 15:14]

Report message to a moderator

Re: Problems getting eclipse to recognize JDK [message #655527 is a reply to message #655523] Mon, 21 February 2011 15:16 Go to previous messageGo to next message
Jackie Gleason is currently offline Jackie GleasonFriend
Messages: 6
Registered: July 2009
Junior Member
This might help...

When I move the -vm under the openFile I get the following...

JVM terminated. Exit code=255
/usr/lib/jvm/java-6-sun/bin/javaws
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/jackie/Development/Eclipse/Helio/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/jackie/Development/Eclipse/Helio/eclipse
-name Eclipse
--launcher.library /home/jackie/Development/Eclipse/Helio/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1.R36x_v20100810/eclipse_1309.so
-startup /home/jackie/Development/Eclipse/Helio/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-exitdata 5d001c
-product org.eclipse.epp.package.jee.product
-vm /usr/lib/jvm/java-6-sun/bin/javaws
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar /home/jackie/Development/Eclipse/Helio/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar 


So it looks like somewhere something is set up as Java 1.5, Not sure where though.
Re: Problems getting eclipse to recognize JDK [message #655536 is a reply to message #655524] Mon, 21 February 2011 15:49 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On Mon, 2011-02-21 at 10:13 -0500, Jackie Gleason wrote:
> Thanks for your response, I did try putting it on another line. From what I can tell the difference between using Java and JavaWs has something with it acting like a daemon instead of a process. I don't remember all the reasons I just remember I researched it and supposedly it is the proper way.
>
> So I guess the only option I have left is to try to install straight from Oracle as you suggested, but to be honest I have little faith this will work (I have looked and the install directory looks to be set up correctly).
>
> I thought this might have had something to do with the facets on my project (it was set to 1.5) I tried changing all these to the 1.6 JDK but still no dice.
>
> Any other idea?
Javaws is for Java Web Start. It isn't a Java VM. You need to use the
java executable.

You may be confusing javaws with javaw on Windows. Javaw is a version
of the vm that runs on Windows and doesn't open up a console window. It
only pertains to the Windows platform.
Re: Problems getting eclipse to recognize JDK [message #655792 is a reply to message #655524] Tue, 22 February 2011 16:18 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
On 2/21/11 10:13 AM, Jackie Gleason wrote:
> Thanks for your response, I did try putting it on another line. From
> what I can tell the difference between using Java and JavaWs has
> something with it acting like a daemon instead of a process. I don't
> remember all the reasons I just remember I researched it and supposedly
> it is the proper way.
> So I guess the only option I have left is to try to install straight
> from Oracle as you suggested, but to be honest I have little faith this
> will work (I have looked and the install directory looks to be set up
> correctly).
>
> I thought this might have had something to do with the facets on my
> project (it was set to 1.5) I tried changing all these to the 1.6 JDK
> but still no dice.
> Any other idea?

In addition to correct formatting of eclipse.ini, Russ's other advice
about using a JDK instead of a JRE is the key piece. The message about
Maven that you originally asked about is definitely due to the fact that
Eclipse is running in a JRE instead of a JDK (it's one of the little
quirks of the m2e Maven plugins).
Russ's example of what his eclipse.ini is a good one; make sure you've
installed the JDK (including source, which you'll find helpful).

Eric
Previous Topic:Eclipse Help plug-in
Next Topic:Dependency management with Nexus references
Goto Forum:
  


Current Time: Fri Apr 26 20:48:53 GMT 2024

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

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

Back to the top