在程序执行时如何在build.xml中添加java命令参数?

发布于 2024-08-12 02:20:44 字数 203 浏览 4 评论 0原文

我只能执行我制作的应用程序,在命令行中使用以下命令:

java -jar -Djava.net.preferIPv4Stack=true P2P_network.jar

我想知道,如何将其放入 jar 文件中,以便我可以自动执行它,而不需要进入命令行。

使用的IDE是netbeans。

I can only execute an application i made, with the following command in the command line:

java -jar -Djava.net.preferIPv4Stack=true P2P_network.jar

I would like to know, how can i put this in the jar file, so i can execute it automatically, without needing to go to the command line.

The IDE used is netbeans.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苏大泽ㄣ 2024-08-19 02:20:44

这个答案可能会有所帮助。 “dash dee”和“dash enableassertions”都是 VM 选项。

This answer may help. The 'dash dee' and 'dash enableassertions' are both VM Options.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文