I have written an application in Java. Now I would like to run from my application another program as like Process p = Runtime.getRuntime().exec("test.cmd");
but the application I would like to run needs to be a runable Jar file.
How can I do this?
You can execute .jar application using:
java -jar application.jar
in some cases you need to specify classpath using -cp
flag and class that contains main function.
More info here: https://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments