Hosting the Java compiler in an applet or in Google AppEngine?

白昼怎懂夜的黑 提交于 2019-12-06 15:04:00

Yes, the compiler as such is really just a normal Java application (except that it usually brings its own native launcher, but that's not required).

So you can easily run it within an Applet or inside GAE.

However that won't really help too much, because if you want to actually run the produced classes, then you'd need to play with ClassLoader instances which is not allowed in (unsigned) Applets and probably not allowed in GAE.

..Could java compiler be hosted in an applet?

Only if you add the tools.jar to the runtime class-path of the applet. See Add the compiler to the application's runtime classpath in the STBC help for details.

..Could java compiler be made to work on GAE, ..

Not sure, though note that someone seems to have registered a Google app. by the name of 'javacompiler'. ;)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!