Is there some way by which I can configure eclipse to run a program with certain command line arguments for debugging.
-- 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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With