how to restart java application, remembering its command line arguments

后端 未结 5 382
一整个雨季
一整个雨季 2021-01-14 03:07

I have a java application. It can be started with couple of command line flags. I want to provide ability \"restart\" the application by user.

Currently we save the

5条回答
  •  逝去的感伤
    2021-01-14 04:02

    Why not serialize and create the object again from disk when restarted?

    You will need to implement the Serializable interface in a "CommandLineParams" class to do this.

    I think it's the most structured way to accomplish what you are trying to do.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题