Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (472)
Games in Android Showcase (105)
games submitted by our members
Games in WIP (524)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Putting java commands into a .jar file  (Read 1051 times)
0 Members and 1 Guest are viewing this topic.
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11


Game Engineer


« Posted 2005-11-10 02:07:39 »

Hey guys. I've got a question about putting -Xmx2048MB directly into a .jar file so that it increases the heap size every time I open the jar. Do I just pass this into the args array in my main method? Can I call this using actual Java code within my program?

I'm using Eclipse to generate the .jar files. Thanks guys.

See my work:
OTC Software
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #1 - Posted 2005-11-10 02:32:23 »

I don't think executable jars have any mechanism for this at all.  Use Java Web Start or write your own launcher.   Even a shell script/batch file will work, but then you have to supply one for every platform you support.

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 73
Projects: 15


★★★★★


« Reply #2 - Posted 2005-11-10 14:30:52 »

not tried this but it might work if you use in code

System.setProperty("Xmx2048", "true");
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline hvor2

Junior Member




Beyond mind, there is an awareness...


« Reply #3 - Posted 2005-11-10 14:48:10 »

Me too don't think executable jars can do that. Manifest  file doesn't support arguments such as yours. As swpalmer says, webstart or your launcher...

Offline kevglass

JGO Kernel


Medals: 103
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #4 - Posted 2005-11-10 18:57:48 »

Quote
System.setProperty("Xmx2048", "true");

This won't work, it'd be equivilent to -DXmx2048, rather than -Xmx2048. The -X options need to be specified before the VM is running.

Kev

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11


Game Engineer


« Reply #5 - Posted 2005-11-11 02:49:50 »

I ended up making an executable Unix file to launch it, and a batch for Windows. Thanks for the help, guys.

See my work:
OTC Software
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (10 views)
2014-07-10 20:20:18

CopyableCougar4 (17 views)
2014-07-10 02:26:14

CopyableCougar4 (25 views)
2014-07-09 02:55:38

Code Mage (25 views)
2014-07-08 23:57:00

Code Mage (11 views)
2014-07-08 23:49:08

AppleSauce (20 views)
2014-07-08 19:25:32

CopyableCougar4 (21 views)
2014-07-06 01:51:26

ipe369 (26 views)
2014-07-05 14:18:25

vastrolorde (37 views)
2014-07-04 18:45:44

theagentd (54 views)
2014-07-02 22:19:37
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!