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

3 Answers 3

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

1
  • How can I add - noVerify argument in external tomcat? Nov 12, 2018 at 12:52
1

Run --> Run Configurations --> Arguments

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.