Using Java to Compile Java

Java Tip 131: Make a statement with javac!
From the article:
Many developers do not realize that an application can access javac programmatically. A class called com.sun.tools.javac.Main acts as the main entry point. If you know how to use javac on the command line, you already know how to use this class: its compile() method takes the familiar command-line input arguments.

One thought on “Using Java to Compile Java”

  1. I found that to compile using java more dificult than turbo c++.speciall using import packages.Is there any way,it is eisier to compile.

Leave a Reply

Your email address will not be published. Required fields are marked *