在Eclipse中运行java代码时如何添加命令行参数? [英] how to add command line parameters when running java code in Eclipse?

查看:521
本文介绍了在Eclipse中运行java代码时如何添加命令行参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Eclipse中向JVM添加命令行参数?例如,假设我想在运行JVM时显式添加-cp参数,是可能吗? (我给它举个例子,我意识到我可以添加一个外部Jar到项目设置以获得一个额外的类路径。)

How can I add command line parameters to the JVM in Eclipse? For example, let's say I want to explicitly add -cp argument when running the JVM, is it possible? (I am giving it as an example, I realize I can add an external Jar to the project settings to get an additional classpath.)

我想添加的参数是

The argument I want to add is -agentlib:Shark (on Mac OSx for running a profiler).

推荐答案

这篇关于在Eclipse中运行java代码时如何添加命令行参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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