Assigning more memory to JOSM - how?

Hello All, I’ve been greeted with the message telling me that JOSM may behave weirdly (or whatever it says) and I need to assign some more memory. How do I do this? (please bare in mind that I don’t know too much about computers - a step by step guide would be ideal).
cheers

This depends on what operating system you are using, and how you are running JOSM. To assign more memory, I think you will have to use the “jar” version, not the webstart or Windows installer.
So go to the JOSM wesbite, and download the file josm-tested.jar

You need a command to run this. The simplest would be something like

java -jar D:\Downloads\josm-tested.jar

Change the directory to wherever you saved the jar file. Depending on how Java is set up, you might need to use the full path for that, eg “C:\Program files\Java\jre7\bin\java.exe”
To assign more memory, you have to add that to the command. eg to assign 1024MB (1GB):

java -Xmx1024M -jar D:\Downloads\josm-tested.jar

To run this command each time you start JOSM, you can save it as a batch file. In Windows, you can open Notepad, then paste that command in, and save it as a file named JOSM.cmd Then you should be able to double click on that to start JOSM, with enough memory assigned.

How does this work when you use the webstart josm? I’ve tried adding the -Xmx1024M option but it still gave the same error.

My commandline for webstart is C:\Windows\SysWOW64\javaws.exe -Xmx1024M -localfile -J-Djnlp.application.href=http://josm.openstreetmap.de/download/josm.jnlp “C:\Users\Maarten\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\21\73111055-507592e8”

What is really strange is that for the last months I never had this problem and now all of a sudden it pops up. The only thing I did was clear all the imagery cache (the JMapViewerTiles directory).

If I understood javaws’s help correctly try “-J-Xmx1024M”.

I too have only just started having this problem and I have been using JOSM since 2013. All the information supplied presumes that people using the programme are programmers which is very short sighted. I have spent the whole day wading through messages, FAQs, wiki. JOSM help, and am still none the wiser as to how to get this “magical” -xXmc###M or how to put it where it is supposed to be. As the first person asked…could we have a step by step walk through of how this works… and where to find it. I am on Windows 7.
It has only just started happening at our last regular Mapathon as well where we had three people encounter this problem. We have been holding Mapathons every month since the middle of last year so if JOSM default memory download needs to be increased because of some changes to the programming then it needs to be addressed in the default programming. When I downloaded that default was 247MB, the increase example I saw gave an example of 256, but I believe the realistic level is now 1024M.
So this is not going to go away, only more people rummaging around looking for an understandable way to change this without needing a degree in programming. And giving up in the end because there isn’t one.
Some help would really be appreciated because if this is going to continue cropping up we need to be able tell our new mappers how to solve it.
Ralph
Volunteer with HOT
Tutor with Missing Maps, London

Here also, when I updated to JOSM osm 8279, before I did not have this problem.

And I updated to Java 8 update 45

Windows 7, Josm installed with windows installer.

Vclaw’s answer above covers the “JOSM” part of it, I suspect. What it doesn’t say is “how to get to a command prompt on Windows 7”. Thankfully a web search of “windows 7 command” finds this page:

http://windows.microsoft.com/en-gb/windows/command-prompt-faq#1TC=windows-7

Once you’ve read the help and followed the instructions there you should be able to follow Vclaw’s instructions. You’ll need to note where you download JOSM to, and amend the command lines provided accordingly.

@RAytoun, I don’t believe that “All the information supplied presumes that people using the programme are programmers”, but it does perhaps assume a level of computer familiarity that people who “just use a computer as a web browser” (such as might attend a missing maps event) don’t have. I suspect that you’ll need to amend whatever instructions you provide to attendees if you want them to use JOSM.

Thanks @SomeoneElse, I AM one of those illiterates that only use the computer as a web browser. I have dumped the web start launcher and downloaded the tested jar. Somewhere it says I have to install jdk but now my Chrome browser will not support Java plugins, they have changed the way their browser supports plugins.
cmd prompt for Windows 7. Open start at bottom left and type cmd on the search box.

First part of solving problems with JOSM.

If you are using Google Chrome as your web browser then the following warning affects you

“We have detected you are using Google Chrome and might be unable to use Java plugins from this browser. Starting with version 42 (released April 2015) Chrome has disabled the standard way in which browsers support plugins.”

The way to sort this is as follows:

  1. Open your Chrome browser.

  2. In the URL panel at the top type in… chrome://flags/enable-npapi

  3. Click the “Enable” button for ENABLE NPAPI.

  4. At the bottom of the page click the “Relaunch” button that has now appeared.

Task completed :slight_smile:

there are some info here:
https://josm.openstreetmap.de/wiki/Download#VMselectiononWindowsx64

(use “C:\Windows\System32\javaws.exe -J-d64 -Xmx=2048m -localfile …”)

See also http://forum.openstreetmap.org/viewtopic.php?pid=559921#p559921