Default arguments in JAR-manifest

筅森魡賤 提交于 2019-12-05 03:47:29

To the best of my knowledge, no. You'll have to do that kind of thing yourself, in code.

A lot of people find it useful to write a little main class that sets up an environment and then acts as a ClassLoader for the "real" main program. Typically, such pre-mains fiddle with the classpath of their application, but your kind of problem is something else that could be solved like this.

I would design the application to have default settings built in, and override the defaults if the user gives different arguments.

In your setup, what happens if the user gives arguments that are different? Wouldn't end up with multiple similar arguments and have to awkwardly handle that?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!