Modify

Opened 3 months ago

Closed 3 months ago

#15894 closed task (fixed)

How increase allocated memory when using JOSM webstart?

Reported by: iriman@… Owned by: team
Priority: normal Milestone:
Component: Wiki content Version: latest
Keywords: java webstart Xmx memory josm.jnlp command line options Cc:

Description

Hi, I'm on Windows 7 with the latest Java installed. I've installed JOSM using "josm.jnlp" Webstart.

When I add -Xmx1024M to the target path of JOSM shortcut, like this:

"C:\Program Files\Java\jre1.8.0_161\bin\javaws.exe" -Xmx1024M -localfile -J-Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp "C:\Users\UserName\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-6314d71c"

the allocated memory doesn't change. How may I do this?

There is no problem with "josm-tested.jar" and adding -Xmx1024M will work.

Attachments (0)

Change History (7)

comment:1 Changed 3 months ago by Hb---

Are the JAVA run options case sensitive? Did you check https://josm.openstreetmap.de/wiki/Help/CommandLineOptions ?

comment:2 Changed 3 months ago by Don-vip

Component: AppletCore Webstart

Applet has been dropped years ago. Please don't use this component.

comment:3 in reply to:  1 Changed 3 months ago by anonymous

Replying to Hb---:

Are the JAVA run options case sensitive? Did you check https://josm.openstreetmap.de/wiki/Help/CommandLineOptions ?

Not sure, maybe not. I tried -Xmx1024m, but no luck.

As mentioned at JNLP File Syntax I modified the josm.jnlp file in one of these ways and memory allocation worked:

  • Adding -Xmx1024m argument to java-vm-args.
  • Adding max-heap-size=1024M attribute to java element (<java version="1.8+" max-heap-size=1024M java-vm-args="..."/>)

Then I cannot use shortcut on desktop and should open josm.jnlp directly. This is what I've totally found out.

Last edited 3 months ago by Don-vip (previous) (diff)

comment:4 in reply to:  2 Changed 3 months ago by Hb---

Replying to comment 2:

Applet has been dropped years ago.

Clicking Launch josm.jnlp on / under Windows 7 creates as side effect two JOSM.lnk files. One as Desktop icon and the second as Start Menu item in C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\JOSM\. These .lnk files have the target "C:\Program Files\Java\jre1.8.0_161\bin\javaws.exe" -localfile -J-Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp "C:\Users\<user>\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-507a5420"

Aside from OPs question: Will these links break after updating java because of the hard coded javaws location?

Replying to anonym:

As mentioned at JNLP File Syntax I modified the josm.jnlp file in one of these ways and memory allocation worked ...

Thanks for working that out. But it seems that we have easier options.

Then I cannot use shortcut on desktop and should open josm.jnlp directly. This is what I've totally found out.

I could control the memory used with:

  1. Downloading the josm.jnlp file
  2. Open a command prompt (As usually javaws.exe is found in the Path=)
  3. Run javaws -J-Xmx2048m josm.jnlp

Placing a -J before each parameter makes javaws giving them to the virtual machine. Otherwise those parameters are only read by the WebLauncher.

Our Help does not handle this task right in Download#Doubleclickonafiledoesnothing currently. The -Xmx must be preceded by an own -J prefix and must not have an equation sign before the numeric value.

Please feel free to edit the wiki.

comment:5 in reply to:  1 Changed 3 months ago by anonymous

Replying to Hb---:

I could control the memory used with:

  1. Downloading the josm.jnlp file
  2. Open a command prompt (As usually javaws.exe is found in the Path=)
  3. Run javaws -J-Xmx2048m josm.jnlp

Placing a -J before each parameter makes javaws giving them to the virtual machine. Otherwise those parameters are only read by the WebLauncher.

I tried adding -J-Xmx1024m to the target path of the shortcut on desktop. Nothing happened. No run.

Replying to Hb---:

Are the JAVA run options case sensitive? Did you check https://josm.openstreetmap.de/wiki/Help/CommandLineOptions ?

Then I tried -J-Xmx1024M and it worked! I modified target of shortcut to:

"C:\Program Files\Java\jre1.8.0_161\bin\javaws.exe" -J-Xmx1024M -localfile -J-Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp "C:\Users\<UserName>\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-6314d71c"

Thank you man!

comment:6 Changed 3 months ago by Don-vip

Component: Core WebstartWiki content

mmm, this clearly needs to be documented :)

comment:7 Changed 3 months ago by Hb---

Keywords: command line options added
Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.