Linked Questions

16 votes
5 answers
71k views

I am working on a simple java program. It simply compiles and executes another java program. I am using Runtime.exec() function to compile and run. There is no problem with compilation. but when it ...
AKA's user avatar
  • 7,275
-4 votes
2 answers
20k views

Possible Duplicate: how to compile & run java program in another java program? eg if i have A.java and B.java then i want to compile and run B.java using A.java.
user1722639's user avatar
0 votes
1 answer
121 views

I have java program with interface created using Java Swing. The interface contains a JButton. I want to add Action to that button so that it should execute another Java program which I specify. How ...
sharath v Yajaman's user avatar
2 votes
0 answers
94 views

I need to (compile and) run another class with main method in Java and read its output and later write into its input, but focus on reading first. Let's say i need to test wether the application ...
kajacx's user avatar
  • 13.1k
-3 votes
3 answers
2k views

I want to create a program that can Compile a .java file to a .class file like it is done on this website: Innovation website My questions are: Is there an library i can use to do this? Where can I ...
Fryslan's user avatar
  • 13
0 votes
4 answers
1k views

I would like to know how to enter commands into the cmd.exe (command prompt window) , after its been opened? I have the code below to open cmd.exe: Runtime rt= Runtime....
jerryh91's user avatar
  • 1,805
2 votes
3 answers
2k views

Background info: I am a high school student who is currently learning Java and as so if my code has an obvious flaw in it/ I accidentally reinvent the wheel with the code, I apologize. Recently I ...
star2wars3's user avatar
-1 votes
1 answer
2k views

i'm trying to compile & run some .java file. i used for each of them with Process.waitfor() so the compilation will complete. the compilation was successful here's my code: public class Try2{...
danielos_s23's user avatar
1 vote
2 answers
247 views

Can I make a Java program to generate another java application at runtime. I want to make a "installer" program, which takes user input and generates an application as per user requirement, ...
Vaisakh K M's user avatar
2 votes
1 answer
304 views

I want to make a program that open another java programs.how can i run/execute the cmd command in compiling and running java programs. for example c:\Users\Burnok> javac HelloWorld.java and ...
user3276091's user avatar
1 vote
3 answers
301 views

I tried this but it didin't work. My method to launch command prompt commands: public static void executeCommand(String command, String path){ File folder = new File(path); ProcessBuilder pb = ...
Hello World's user avatar
2 votes
3 answers
351 views

I tried running the accepted answer in question using netbeans. The class file created but it is not executing. Here is my code import java.io.*; public class Laj { private static void ...
Neethu Krishna's user avatar
0 votes
2 answers
182 views

I want my java program to execute a different java program. I used following method. (The program I want to run is Example.java) class RunJava { public static void main(String a[])throws Exception { ...
user2916888's user avatar
2 votes
2 answers
168 views

I want to execute another Java program in my program. I have taken reference from here. For testing I have pasted same code as accepted answer shows.I have passed a simple HelloWorld program. Program ...
Sarjit Delivala's user avatar
0 votes
0 answers
98 views

I want to compile and run the java file at the server end and output to be viewed at the client end,so when asked for input,can be supplied by programmer. So far I have used the Java Compiler API to ...
Mayank's user avatar
  • 19

15 30 50 per page