java options in executable jar file
I am bundling a java application in an executable jar file. The application requires a large virtual machine, so it gets invoked like this:
java -Xmx300M -jar my.jar
But the end-user only knows how to point and click, and expects to invoke the application by double-clicking on the icon.Is there a way to tell the application to use the -Xmx option without going through the command line?
[407 byte] By [
sbernstea] at [2007-10-2 21:04:52]

In a similar situation, we decided to just use a batch file to provide all of the options needed. The user just double-clicks a shortcut on their desktop, the batch file runs minimized, and immediately calls:
start javaw -Xmx256m -jat my.jar
exit
so that the DOS command window disappears quickly. Since it is launched with a shortcut, we can associate whatever icon we want and a short cut file can be included in a ZIP file to deploy to the user's desktop (or wherever you want).