I would like to run a
java program lets say justin.java
Problem is:
I want to create a jar file.
Click on that jar file
Have a joption pane come up with three buttons
First button runs the program
the other two give the results.
I can do all of this except get the program to initially run after running my main program runs. I can right click on justin.java (run app) and it runs fine. I just don't know how to select a program with a JButton and cause the program to run. So I can select the next button and see results.
I can select second JButton and have it show me the results. I would think just requesting that program would cause it to execute but I guess not.
Any help is really appreciated. Below is a couple things I have tried.
[code]
if (Jmoney.equals("MMMMMM"))
{
new Justin ();
[code/]
[CODE]
// try {
//theProcess = Runtime.getRuntime().exec("C:\\EclipseProjects\\PM\\Justin.java");
//} catch (IOException e1) {
// TODO Auto-generated catch block
//e1.printStackTrace();
//}
[code/]