Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Controlling Java Compiler by Program

 
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 ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic