> > Does anyone know how to call the java compiler from within a java
> > program and without using Runtime.exec()?
> 
> It is not a question specific to Java and *Linux*.
> Here is not just proper place to ask it.
> 
> You can make use of the class sun.tools.javac.Main as:
> 
>   sun.tools.javac.Main javac = new sun.tools.javac.Main(System.out, "javac");
>   javac.compile(new String[]{"Foo.java"});
> 
> Sun don't make the sun.* API open to the public.

But you can javap them :)

If you plan on distributing this, check to make sure the JRE classes.zip
actually contains the sun.tool.* hierarchy.  I don't think it does.

dstn.

----------------------------------------------
   Dustin Lang,  [EMAIL PROTECTED]
(java developer,linux guy, all-round goofball)
----------------------------------------------


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to