#5635 closed defect (fixed)
restart plugin does not preserve start options
| Reported by: | bastiK | Owned by: | Upliner |
|---|---|---|---|
| Priority: | normal | Component: | Core restart |
| Version: | Keywords: | ||
| Cc: |
Description (last modified by skyper)
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 Changed 3 years ago by Upliner
comment:2 Changed 3 years ago by bastiK
System.getenv() should work here. But -Xmx400m is different again, not sure about that.
comment:3 Changed 3 years ago by bastiK
another thing: there is an command line option --language=de. (Haven't tested if it works with your plugin)
comment:4 follow-up: ↓ 6 Changed 3 years ago by Upliner
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 in reply to: ↑ 4 Changed 16 months ago by simon04
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 Changed 15 months ago by xeen
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.
comment:8 follow-up: ↓ 10 Changed 11 months ago by Upliner
- Resolution set to fixed
- Status changed from new to closed
Fixed in [o28438]. Thanks to simon04. Maybe I'll include more advanced solution by xeen sometime later.
comment:9 Changed 11 months ago by skyper
Ticket #6344 has been marked as a duplicate of this ticket.



Does anybody know, is there a way to robustly determine launch settings like that? I haven't found one yet...