Viewing 4 posts - 1 through 4 (of 4 total)
  • Windows Java heap size – any Java experts?
  • PJay
    Free Member

    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?

    mogrim
    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.

    PJay
    Free Member

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

    mogrim
    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.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Windows Java heap size – any Java experts?’ is closed to new replies.