Forum search & shortcuts

Windows Java heap s...
 

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

 PJay
Posts: 5063
Free Member
Topic starter
 
[#5846539]

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 7:02 pm
Posts: 12089
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 7:54 pm
 PJay
Posts: 5063
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 7:57 pm
Posts: 12089
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 8:04 pm