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?

Tony the Pony
  • 40,327
  • 71
  • 187
  • 281
  • 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. – Joachim Sauer Dec 22 '10 at 09:36

1 Answers1

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.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • Your answer (no) is good, but I think theses classes ARE in the JRE, at least as of JDK 1.6 : http://download.oracle.com/javase/6/docs/api/javax/tools/JavaCompiler.html – Valentin Rocher Dec 22 '10 at 08:15
  • @Valentin: while those interfaces exist in the JRE, there's no guarantee that you can actually get an implementation, since [`ToolProvider.getSystemJavaCompiler()`](http://download.oracle.com/javase/6/docs/api/javax/tools/ToolProvider.html#getSystemJavaCompiler%28%29) is defined to return "`null` if no compiler is provided." – Joachim Sauer Dec 22 '10 at 08:36