Modify

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#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 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 by Upliner, 14 years ago

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

comment:2 by bastiK, 14 years ago

System.getenv() should work here. But -Xmx400m is different again, not sure about that.

comment:3 by bastiK, 14 years ago

another thing: there is an command line option --language=de. (Haven't tested if it works with your plugin)

comment:4 by Upliner, 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:5 by skyper, 13 years ago

Description: modified (diff)

See also #6344.

in reply to:  4 comment:6 by simon04, 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 xeen, 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.

comment:8 by Upliner, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in [o28438]. Thanks to simon04. Maybe I'll include more advanced solution by xeen sometime later.

comment:9 by skyper, 12 years ago

Ticket #6344 has been marked as a duplicate of this ticket.

in reply to:  8 comment:10 by skyper, 12 years ago

Replying to Upliner:

Fixed in [o28438]. Thanks to simon04. Maybe I'll include more advanced solution by xeen sometime later.

Thanks

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Upliner.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.