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

前端 未结 3 1680
[愿得一人]
[愿得一人] 2020-11-30 15:24

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

相关标签:
3条回答
  • 2020-11-30 15:47

    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

    0 讨论(0)
  • 2020-11-30 15:57

    Run --> Run Configurations --> Arguments

    0 讨论(0)
  • 2020-11-30 15:59

    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.

    0 讨论(0)
提交回复
热议问题