Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running eclipse with command line arguments

Tags:

java

eclipse

Is there some way by which I can configure eclipse to run a program with certain command line arguments for debugging.

like image 690
softwarematter Avatar asked Nov 01 '10 00:11

softwarematter


People also ask

How do I pass a VM argument in Eclipse?

-- Go to the Eclipse Window > preferences, in "Java > Installed JREs". -- Copy the current default JRE with a new name, for example myJRE. -- Select the new JRE and click on the "Edit" button. -- In the "Edit JRE" dialog, add your JVM arguments in the "Default VM Arguments" field.

Can Java take command line arguments?

A Java application can accept any number of arguments from the command line. This allows the user to specify configuration information when the application is launched. When an application is launched, the runtime system passes the command-line arguments to the application's main method via an array of String s.

How do I see arguments in Eclipse?

Discussion. When you place the cursor in a method's argument list, you will see a list of parameter hints. In the JDT editor, press Ctrl-Shift-Space, or select Edit→ Parameter Hints. A tool tip will appear, showing the method's parameters.


1 Answers

You need to configure the command line arguments for Eclipse: Under Run configurations>Arguments

Read here

Also consider using Ant as a build script. Works better in the long run.

like image 186
zengr Avatar answered Oct 04 '22 21:10

zengr