This is my code:
import java.io.IOException;
public class testv1 {
public static void main (String[] args) {
System.out.println("ABC");
try {
Process proc = Runtime.getRuntime()
.exec("D:\\Program\\Pyinstaller\\Merge\\Test\\dist\\helloworld.exe");
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("Done");
}
}
I want to run helloworld.exe but it's not working. The program is just printing
ABC
DONE
I also tried this:
import java.io.File;
import java.io.IOException;
public class testv1 {
public static void main (String[] args) {
System.out.println("ABC");
try
{
Runtime.getRuntime().exec("D:\\Program\\Pyinstaller\\Merge\\Test\\dist\\helloworld.exe", null, new File("D:\\Program\\Pyinstaller\\Merge\\Test\\dist\\"));
}
catch (IOException e)
{
e.printStackTrace();
}
System.out.println("Done");
}
}
but same output as the previous one.