如何运行带命令行VM参数的Java项目? [英] How to run a java project with vm arguments from command line?

查看:342
本文介绍了如何运行带命令行VM参数的Java项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写有初始化与特定的VM参数另一个Java项目Maven插件。根据EXEC:java的,他们只需要在参数而不是VMarguments,所以我的问题是如何启动与命令行特定VMarguments Java项目?
谢谢

I'm writing a maven plugin which has to initialize another java project with specific VM arguments. according to the exec:java, they only take in arguments but not VMarguments, so my question is how to launch a java project with specific VMarguments from the command line? thanks

推荐答案

如果你使用Maven的EXEC不能提供额外的VM参数:Java插件,因为它在同一个虚拟机运行(即它已经被初始化)。你需要使用EXEC:Exec和构建Java命令行自己

You can't supply extra VM arguments if you use Maven's exec:java plugin because it runs in the same VM (i.e. it's already been initialized). You'll need to use exec:exec, and construct the java command line yourself.

这篇关于如何运行带命令行VM参数的Java项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆