Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jar and JVM variables when packing  RSS feed

 
Saeed Anwar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there anyway to configure/pass JVM runtime variables to jar when packing a jar file?

I don't want user to type
java -Xmx512m -jar MyApplication.jar

instead, I want to pass on this info when packing jar file so that when user double clicks on MyApplication.jar JVM knows that it needs 512M of memory.

Thanks for your help.
 
Campbell Ritchie
Sheriff
Posts: 53774
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. Look at this and this, but neither seems to mention JVM arguments like Xmx and Xms.
 
BV Boose
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
run it from a script?
 
Henry Wong
author
Sheriff
Posts: 22851
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't want user to type ...


Generally, when you don't want a user to type, the best options are either a shellscript (unix) or batch file (windows).

Henry
 
Saeed Anwar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot everybody.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!