Windows Java heap s...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

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

3 Posts
2 Users
0 Reactions
90 Views
 PJay
Posts: 4818
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: 12072
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: 4818
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: 12072
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

6 DAYS LEFT
We are currently at 95% of our target!