#5635 closed defect (fixed)
restart plugin does not preserve start options
Reported by: | bastiK | Owned by: | Upliner |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core restart | Version: | |
Keywords: | Cc: |
Description (last modified by )
When I start josm like this:
java -Djosm.home=$HOME/.josm-dev -jar dist/josm-custom.jar
The preference folder is changed to the default folder after restart.
Attachments (0)
Change History (10)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
System.getenv()
should work here. But -Xmx400m
is different again, not sure about that.
comment:3 by , 14 years ago
another thing: there is an command line option --language=de
. (Haven't tested if it works with your plugin)
follow-up: 6 comment:4 by , 14 years ago
OK, I can dump the whole environment to the command line, however not all options are passed through the environment. It's quite easy to handle some specific options(currently, I handle only -Xmx), but it would be nice to find out some universal way that handles all possible startup options.
comment:6 by , 13 years ago
Replying to Upliner:
but it would be nice to find out some universal way that handles all possible startup options.
Is ManagementFactory.getRuntimeMXBean().getInputArguments()
what you are looking for?
comment:7 by , 13 years ago
http://leolewis.website.org/wordpress/2011/07/06/programmatically-restart-a-java-application/ probably handles more than what we need, but it should cover everything. Nicely documented, too.
follow-up: 10 comment:8 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [o28438]. Thanks to simon04. Maybe I'll include more advanced solution by xeen sometime later.
comment:10 by , 12 years ago
Replying to Upliner:
Fixed in [o28438]. Thanks to simon04. Maybe I'll include more advanced solution by xeen sometime later.
Thanks
Does anybody know, is there a way to robustly determine launch settings like that? I haven't found one yet...