0

I am really having trouble starting with eclipse. I want to configure eclipse so that it uses the version 7 for both the jdk and jre. How can I do this.

Right now,when I try to deploy my application to google app engine, I get this message :

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

This is my configuration for the installed jre section :

enter image description here

What could be the reason for the problem ? Please give an insight into the problem.

6
  • Run Configurations... -> JRE tab Commented Mar 13, 2014 at 16:14
  • Can you give us the complete path of the JDK Location? Commented Mar 13, 2014 at 16:18
  • A JDK contains the JRE... Commented Mar 13, 2014 at 16:27
  • @PabloLozano home/non-admin/jdk1.7.0_02/ Commented Mar 13, 2014 at 16:29
  • Have you checked stackoverflow.com/questions/13938995/… Commented Mar 14, 2014 at 8:35

1 Answer 1

-1

The reason is just what the error message says: The Google App Engine apparently will not run your code with a JDK, but only a JRE.

Your eclipse JRE/JDK settings do not matter here. They can't cause your deployment target to suddenly have a JDK installed. But since you use JDK features (like the compiler), your app will not run where only a JRE is installed.

For a remedy, you can bundle the eclipse compiler ecj.jar (you'll find it somewhere in the internet or even via maven) with your application, and rewrite the part that compiles stuff accordingly.

Sign up to request clarification or add additional context in comments.

11 Comments

It quite the opposite: a JDK is needed.
@PabloLozano How is thta the opposite?
You have written that GAE does not run in a JDK, but the error message says "Please use a JDK"
@PabloLozano You must be confused. The message appears precisely because he needs an JDK, but GAE has none. That is what I said!
Ok, I got it: what you really mean is "The GAE apparently is not running on a JDK, but only on a JRE". If you use present simple the meaning changes a lot. PS: the downvote is not mine :(
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.