﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
22833	[Patch] Command line environment variables are overwritten by /etc/default/josm	skyper	team	"==== What steps will reproduce the problem?
1. Enter `JAVA_OPTS=""-Xmx256m -Djosm.home=/tmp/josm"" josm` in the console.

==== What is the expected result?
JOSM starts with appropriate assigned memory and JOSM dirs plus all environment variables set in `/etc/default/josm` and `/usr/bin/josm`

==== What happens instead?
All environment variables are present but the assigned memory value is taken from `/etc/default/josm`.

==== Please provide any additional information below. Attach a screenshot if possible.
Changing the order of the argument and the variable in `/etc/default/josm` seems to do the trick, e.g. `JAVA_OPTS=""${JAVA_OPTS} -Xmx768m""` to `JAVA_OPTS=""-Xmx768m ${JAVA_OPTS}""`.

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-03-21 14:21:54 +0100 (Tue, 21 Mar 2023)
Revision:18698
Build-Date:2023-03-22 02:31:00
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18698 en) Linux Debian GNU/Linux 11 (bullseye)
Memory Usage: 158 MB / 768 MB (41 MB allocated, but free)
Java version: 17.0.6+10-Debian-1deb11u1, Debian, OpenJDK 64-Bit Server VM
VM arguments: [--module-path=/usr/share/openjfx/lib, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, -Djosm.restart=true, -Djosm.dir.name=JOSM-latest, -Djava.net.useSystemProxies=true, -Djosm.home=<josm.pref>, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]
}}}
"	defect	new	normal		Ubuntu package	latest		template_report	sebastic
