Windows Java heap s...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Windows Java heap size - any Java experts?

3 Posts
2 Users
0 Reactions
113 Views
 PJay
Posts: 4889
Free Member
Topic starter
 

I've been trying to run mkgmap.jar to convert Open Street Map files to .img files to use on my Garmin ETrex 30. The program runs under Java from a Windows command prompt and always fails with an out of memory/Java heap error.

Most Java articles I've found on the internet suggest using the -Xms switch to set the minimum size of the java heap but the version of Java on my Windows 8 machine (Java 7 update 45 64 bit) reports an unrecognised switch when I try to use this; the help switch shows no heap size related switches either.

Does anyone know how to increase the java heap size for an applet running from a command line?


 
Posted : 11/01/2014 6:02 pm
Posts: 12079
Full Member
 

You sure you're running an applet?

Anyway, try: java -Xms40m -Xmx1024m -jar mkgmap.jar

Edit: note the lack of spaces, that's probably where you're going wrong.


 
Posted : 11/01/2014 6:54 pm
 PJay
Posts: 4889
Free Member
Topic starter
 

It's a .jar file (not sure if that makes it an applet or not) but your suggestion seems to work, thank you!


 
Posted : 11/01/2014 6:57 pm
Posts: 12079
Full Member
 

Happy to help!

FYI: (fascinating fact follows...)
An applet runs in the browser, a cmd line jar is an application.

For future use I'd make a .bat file.


 
Posted : 11/01/2014 7:04 pm