• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to compile a java file from java program  RSS feed

 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to compile the java file in java program can somebody please pass some hints regarding how to do it.

cheers,
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes (but not always) this is a symptom of problem with program design. Could you please tell us why you are wishing to do this? What is the overall goal of this portion of the program.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Starting with Java 6, there's an official API for compiling Java source code. Earlier JDK versions require some trickery. Check the Java Intermediate FAQ for some links on this.
 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf Dittmer,

The api looks great also JEL might also prove to be a help in achieving what i am trying.

And pete i agree the solution involving compiling the class on the fly is a dirty fix most of time but i know exactly why it's been required in my case.

Thanks for your concern.

Cheers
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!