Modify

Opened 3 years ago

Closed 11 months ago

Last modified 11 months ago

#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

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

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: 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:5 Changed 16 months ago by skyper

  • Description modified (diff)

See also #6344.

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: 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.

comment:10 in reply to: ↑ 8 Changed 11 months ago by skyper

Replying to Upliner:

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

Thanks

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.