Currently I am starting my Slick 2D application via this batch file-
java -Djava.library.path=lib -Xms512m -Xmx512m -jar myapp.jar %1
Where lib is the folder that contains the LWJGL/Slick libraries and myapp.jar is my application.
Although this is easy and effective I want to be able not to have to run a script all the time and actually create a java .jar to do this.
So my question is, how would I 'convert' this batch script into Java code?
If anyone knows of the Java game called Minecraft (you should, it is awesome) I would like to create a launcher similar to this.
I need a solution to starting Slick 2D/LWJGL Java project via command line
Started by liamzebedee, Mar 27 2011 03:03 AM
3 replies to this topic
#1
Posted 27 March 2011 - 03:03 AM
|
|
|
#2
Posted 27 March 2011 - 03:54 AM
Part of what's being done here is giving memory settings to the JVM, telling the JVM that it's opening a jar, etc. You're probably better off leaving it alone.
#3
Posted 27 March 2011 - 01:56 PM
So is there an equivalent to
java -Djava.library.path=lib -Xms512m -Xmx512m -jar myapp.jar %1in Java?
#4
Posted 28 March 2011 - 10:40 AM
Well, with Java you can access the commandwindow basicly, by using the Runtime class and doing exec(string);
So I gues you could create a jar, which does only that, the jar will, or should start up myapp.jar. And then die so only myapp is running.
I just hope myapp will not die together with this other jar as it's created by it.
So I gues you could create a jar, which does only that, the jar will, or should start up myapp.jar. And then die so only myapp is running.
I just hope myapp will not die together with this other jar as it's created by it.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









