简体   繁体   English

如何创建具有所有依赖项和属性文件的单个可执行 jar?

[英]How to create single executable jar with all dependencies and with a properties file?

Used this link to create a single jar file that executes.使用链接创建一个可执行的 jar 文件。 But I have some properties file in the project that I would like to change before running each time, how can I do that?但是我想在每次运行之前更改项目中的一些属性文件,我该怎么做?

You can give that property value while executing your jar file.您可以在执行 jar 文件时提供该属性值。 The given value will override configured value.给定的值将覆盖配置的值。 Ex: Suppose you want to change the property name while executing app jar.例如:假设您要在执行 app jar 时更改属性名称。

java -jar app.jar --name="Spring"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何创建包含所有 Maven 依赖项的不可执行 JAR 文件 - How to create a non-executable JAR file that includes all Maven dependencies 如何生成具有所有 maven 依赖项的可执行 jar 文件? - How to produce an executable jar file with all maven dependencies? Maven:生成具有所有依赖项的可执行jar文件 - Maven: Generating an executable jar file with all the dependencies 如何创建单个可执行 jar 文件,包括所有主要和测试包,包括资源文件 - How to create single executable jar file including all main and test packages including resource files 如何使用 maven 和系统依赖项创建可执行的 jar? - How to create executable jar with maven and system dependencies? 创建一个可执行 JAR 及其所有依赖项,并使用 maven 程序集放入 ZIP 文件 - Create an executable JAR with all its dependencies and put in the ZIP file using maven assembly 如何在Eclipse中使用其他外部jar依赖项创建一个不可运行/不可执行的jar - how to create a not runnable/not executable jar with other external jar dependencies in Eclipse 创建可执行 Jar,其中包含所有依赖项作为打包的 jar - Create Executable Jar that includes all the dependencies as packaged jars 在NetBeans中创建一个包含所有依赖项的可执行jar - create an executable jar including all of its dependencies in NetBeans 如何访问可执行文件 JAR 中的属性文件 - How to Access Properties File Within Executable JAR
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM