- Select "Run -> Run Configurations" from the menu.
- Search for you project in the list on the left and select it.
- Select the "Arguments" tab on the right.
- Write the argument you want to pass to the programm in "Programm arguments".
- Click "Run"
- Select "Run -> Run Configurations" from the menu.
- Search for you project in the list on the left and select it.
- Select the "Arguments" tab on the right.
- Write the argument you want to pass to the programm in "Programm arguments".
- Click "Run"
Right click on your java file in project explorer of your eclipse. Then Run As> Run Configuration
Then you will get a window. Like-

Click on Arguments Tabs, and then write some text there, may be a character.
And then Click on Apply button and Run Button.
Videos
Is Eclipse suitable for Java beginners?
Does Eclipse IDE work on all operating systems?
Can we customize the Eclipse IDE interface?
Perform the following steps:
- Create a new project in eclipse
- Link your classes from the project properties' buildpath
- Go to Run->Run Configurations
- Create a new configration
- Point your main class
- And Run
if you are just starting learning Java and dont understand whats going on with all that stuff with eclipse, I would recommend you to start from the basics, write your code in an ordinary text editor (notepad will do, or notepad++ if you want something more), after you have written and saved your source file, open up your command prompt, navigate to the location of the file, and run:
javac YourFileName.java
java YourFileName
here is more detailed guide:http://introcs.cs.princeton.edu/java/15inout/windows-cmd.html
It's important to note that you can't just run arbitrary Java code, but have to have some structure set up (for example, if you're going to call a method, what arguments are you passing in?) To run a specific piece of Java code, you should consider creating a main method in that class that just launches some specific piece of code under the constraints that you'd like. One way to do this would be to add a method public static void main(String[] args) containing the code you want to run. Once you've done this, you can right-click on it, choose the "Run as..." option, and select "Java application" to run the program you've written.
Alternatively, if you just want to check whether some specific piece of code is working, you could consider using JUnit to write unit tests for it. You could then execute the JUnit test suite from Eclipse to check whether that specific piece of code is functioning correctly. This is what I would suggest doing, as it makes it possible to test the software through every step of the development.
Hope this helps!
Yes - right-click it and choose Run as -> Java application. You just need a main method.