This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Controlling Java Compiler by Program  RSS feed

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to dynamically generate java source files and compile them into .class files for users to download. Is there any way to programmatically control the jdk compiler? I know Tomcat is able to compile JSP into class files dynamically. How does it do this?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an existing service that does this -> http://www.innovation.ch/java/java_compile.html

You may invoke the javac command through the ProcessBuilder or use the JavaCompiler API to do this. Is this for a class project or something ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!