Compile java by another java and save the class file in a spec location.

Hi,

I want to compile a java program by another java program and save the resultant class file into a specific location. But I could get the class file in the same location where the main class exist. but i want the class file in some other location.

I was tried like this,

Runtime.getRuntime().exec("javac processInput.java /c c:\\test");

Please give me the solution for this.

Thanks in advance.

Regards,

Gandhiraj G.

[468 byte] By [gandhiraj_g@rediffmail.coma] at [2007-10-3 5:19:49]
# 1
You might look into ANT. It's a java-based compilation system that might suit your needs.I think you'll find it a frustrating exercise to do it using exec.
Krashera at 2007-7-14 23:26:45 > top of Java-index,Java Essentials,Java Programming...
# 2
Hi,Actually i have an idea to use ant to solve this problem earlier. But i changed my plan to use exec later. so if you have any idea to use exec for this problem, kindly help me.Thanks.Regards,Gandhiraj G.
gandhiraj_g@rediffmail.coma at 2007-7-14 23:26:45 > top of Java-index,Java Essentials,Java Programming...