Eclipse is running in a JRE, but a JDK is required

I got this problem –

“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 put the java home as C:Program FilesJavajdk1.5.0_05

and path – C:Program FilesJavajdk1.5.0_05bin

but i got this problem. let me say how i solve it –

open eclipse.ini from eclipse folder. put this line

-vm
C:Program FilesJavajdk1.5.0_05binjavaw.exe

so the total file looks-

-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize

256M
-framework
pluginsorg.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar
-vm
C:Program FilesJavajdk1.5.0_05binjavaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

2nd way solution –

create a bat file under the eclipse folder and put this line

eclipse.exe  -vm “C:Program FilesJavajdk1.5.0_05binjavaw.exe”

save this file.  use this file for opening eclipse.

8 thoughts on “Eclipse is running in a JRE, but a JDK is required

  1. I am modifying my Eclipse shortcut to say:

    eclipse.exe -vm “%JAVA_HOME%binjavaw.exe”

    This way, when Java gets upgraded, as long as I maintain JAVA_HOME, Eclipse is working fine.

  2. Another way to solve it is to put the “%JAVA_HOME%bin” in the path environment variable BEFORE the windows system directories.

Leave a Reply

Your email address will not be published. Required fields are marked *