I am not quiet sure to understand what you want to do. Here is one solution :
Here is a first file : UseMain.java
package test.lang;
public class UseMain
{
public static void main (String[] args)
{
System.out.println ("UseMain - start");
UseMain2.main (null);
System.out.println ("UseMain - end");
}
}
Here is the second file : UseMain2.javapackage test.lang;
public class UseMain2
{
public static void main (String[] args)
{
System.out.println ("UseMain2 - start");
}
}
There is then the more common way of working : with (by heart) : System.getRunTime().exec(new String[] {"javac",
"-cp opt/jdk/1.3/lib/rt.jar",
"MyClassFileFullyQualified",
"Argument_1 Argument_2 Argument_3"});
I thing it should be like that :-D
If you need opther option, please post on the forum !
Thomas SMETS,
SCJP2 - Brussels
P.S. :
http://www.artima.com/forums/howtopost.html