Eclipse : how we take arguments for main when run

In Eclipse you can set up a Run Configuration for the Java Application. Click on the green “play” button in the Launch toolbar (next to the bug icon which starts debugging).

Within that configuration, you can set the working directory and command line arguments – and even prompt the user for command line arguments when it’s run, using arguments like ${string_prompt:Foo}.

Leave a Comment