Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto start eclipse in JDK?

Tags:

java

eclipse

I just installed a Maven plug-in into eclipse the first time. Now there is a message on eclipse startup, that i should start eclipse in JDK not jre to make Maven components run fine. There is a -vm argument which I used in the eclipse.ini:

-vm C:\Program Files (x86)\Java\

But the message is still there after restart.

I've tried the:

C:\Program Files (x86)\Java\bin

and also the:

C:\Program Files (x86)\Java\bin\java.exe

But nothing changed.

How do I start eclipse in JDK?

Thanks in advance.

like image 612
c0d3x Avatar asked Dec 16 '09 21:12

c0d3x


People also ask

How do I run a JDK in Eclipse?

From the above screen, once Eclipse is started up, go to Windows Option > Preferences. Look for Java > Installed JREs. Click on Add > Next (Standard VM). Then Locate Directory of your installed JDK. Then clicked finish.

How to install Java in eclipse on Windows?

From the above screen, once Eclipse is started up, go to Windows Option > Preferences. Look for Java > Installed JREs. Click on Add > Next (Standard VM). Then Locate Directory of your installed JDK.

What version of OpenJDK does eclipse run on?

In the above screenshot, you see Eclipse is running on OpenJDK 11.0.2. 2. How to Change JDK / JRE for Eclipse You know, Eclipse IDE is written in Java so it needs a JDK/JRE installed to run.

How to add JDK 18 support in Eclipse 2022-03?

You can directly click on the link ‘ Eclipse 2022-03 for Java EE developers ‘ to get it. Once you click on the link you will be on the Eclipse download page, then you have to click on the download link appearing on the page or follow the updated steps mentioned there. In order to add JDK 18 support in your eclipse, follow the below steps carefully.


2 Answers

If you're using Windows, right click on your eclipse shortcut and select Properties, in the Shortcut tab you can change what's in the Target: box to specify the jdk. I use

"C:\Program Files\eclipse-jee-galileo-sr1 (3.5.1)\eclipse.exe" -vm "C:\Program Files\Java\jdk1.6.0_16\bin\javaw.exe" -vmargs -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode

For some reason I couldn't get it to use the jdk when I tried editing the eclipse.ini file.

like image 102
Lumpy Oatmeal Avatar answered Oct 23 '22 13:10

Lumpy Oatmeal


You can specify which JVM to launch Eclipse under in your eclipse.ini file. There are detailed instructions for different operating systems on the Eclipse wiki.

like image 41
Bill the Lizard Avatar answered Oct 23 '22 14:10

Bill the Lizard