how to add command line parameters when running java code in Eclipse?
Asked Answered
L

3

6

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).

Lamarckian answered 30/11, 2011 at 1:9 Comment(0)
R
17

You can specify vm arguments when creating a "Run Configuration" in Eclipse. Right-click on your project > Run Configuration > Java Application > Arguments tab.

enter image description here

enter image description here

Retribution answered 30/11, 2011 at 1:14 Comment(1)
How can I add - noVerify argument in external tomcat?Reinaldo
A
1

Run --> Run Configurations --> Arguments

Alonso answered 30/11, 2011 at 1:12 Comment(0)
Q
1

In the Run menu, there is an entry "Run Configurations", which allows you to configure everything about the spawned JVM. It has a tab to set the classpath, and another called "Arguments" where you can set JVM parameters.

Quelpart answered 30/11, 2011 at 1:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.