1
votes

I have the

java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.

While deploying my application on google app engine, I have searched for solutions and found that i should add: -vm C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe to eclipse.ini file to force eclipse to use JDK not JRE, I have confirmed from windows >> prefrences >> java >>> installed JRE that it points to the JDK not the JRE ... I tried uninstalling the whole jdk and installing it again ... and I still have the problem ....

eclipse.ini file is:

-vm C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m

and from Help >> About Eclipse >>>Installation details >>>configuration: I have this:

-startup
F:\programs\some\eclipse-jee-kepler-SR2-win32\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.appendVmargs
-vm C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe
-product
org.eclipse.epp.package.jee.product
-vm
C:\Program Files (x86)\Java\jre7\bin\client\jvm.dll
eclipse.home.location=file:/F:/programs/some/eclipse-jee-kepler-SR2-win32/eclipse/
eclipse.launcher=F:\programs\some\eclipse-jee-kepler-SR2-win32\eclipse\eclipse.exe
eclipse.launcher.name=Eclipse
[email protected]/../p2/

JAVA_HOME variable value: C:\Program Files\Java\jdk1.7.0_02\bin

2
no still not i have tried this solution beforemister 0
which version of sdk you are using?Bharath

2 Answers

1
votes

In eclipse.ini write this (note : you have to add new line after -vm)

-vm 
C:\Program Files\Java\jdk1.7.0_02\bin
0
votes

I tried this and worked. First of all I am using GAE 1.9.2 and Eclipse Luna. Luna too need jdk 1.7. From command prompt mention JAVA_HOME and path. Use normal JAVA_HOME and PATH command to jdk version. There after from console run eclipse. In eclipse set preferred JDK in preferences to jdk 1.7

And it will work.