1

Is there a way to invoke the Java source compiler via JavaCompiler in Google App Engine?

(I didn't see any classes in javax.tools on the white list, so I'm afraid the answer is no)

UPDATE

I'm wondering how Java Server Pages work in Google App Engine, since JSPs are compiled to servlets, which obviously would require a Java compiler?

1
  • 1
    regarding JSPs: Some (many? most?) JSP containers bring their own Java compiler. For example recent Tomcat releases use the Eclipse Java Compiler for this. They don't need those APIs. Commented Dec 22, 2010 at 9:36

1 Answer 1

1

The answer is no (AFAIK).

One reason that you don't see the javax.tools classes in the GAE JRE class whitelist is that they are not JRE classes! You need a JDK installation to use the Java development tools ... including the compiler.

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

2 Comments

Your answer (no) is good, but I think theses classes ARE in the JRE, at least as of JDK 1.6 : download.oracle.com/javase/6/docs/api/javax/tools/…
@Valentin: while those interfaces exist in the JRE, there's no guarantee that you can actually get an implementation, since ToolProvider.getSystemJavaCompiler() is defined to return "null if no compiler is provided."

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.