Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Compiling  and jaring up a .java file from code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Compiling  and jaring up a .java file from code" Watch "Compiling  and jaring up a .java file from code" New topic
Author

Compiling and jaring up a .java file from code

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hi,

I want to write a java class that will compile a .java file to a .class file and then jar it up.

Can you tell me how to do that ?

Regards,


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3432
    
  12
You can use the JavaCompiler interface for compiling and the JarFile class for creating jar files.


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiling and jaring up a .java file from code
 
Similar Threads
about java decompiler
conversion
from class file to java file
File Upload thru jsp page
question on java files