Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Compile code in a file

807606Feb 28 2007 — edited Feb 28 2007
i have some java codes in my "fl.txt"(c:\fl.txt). these are;
public class file_{
public static void main(String args[]){
System.out.print("hello world");
}
}
i want to compile these code from my program(i am building it with java) at runtime.. how can ii do that.i think i need to use runtime.exec() method but i dont know how can i compile these codes in a file....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2007
Added on Feb 28 2007
3 comments
196 views