Reputation: 958
final String dir = "C:\\Users\\theo\\Desktop\\1.6 test\\craftbukkit.jar";
Process proc = Runtime.getRuntime()
.exec("java -Xmx1024M -jar "+ dir +" -o true PAUSE");
So.I did some research around here but this thing apparently is not working/running the JAR file.
Upvotes: 0
Views: 506
Reputation: 43728
Note the space in the path of the jar. This means, in the command you build up it will be seen as two arguments:
java -Xmx1024M -jar C:\Users\theo\Desktop\1.6 test\craftbukkit.jar -o true PAUSE
Try to quote the path to build a command like this:
java -Xmx1024M -jar "C:\Users\theo\Desktop\1.6 test\craftbukkit.jar" -o true PAUSE
Upvotes: 1
Reputation: 77177
main
method on the jar's main class without starting up a new JVM.Upvotes: 0