freddiefujiwara
freddiefujiwara

Reputation: 59019

Is there the console function in Eclipse?

I develop the JAVA in Eclipse.

If I want to add argument my java program I must appoint a value by setting of the practice environment .

So I try it

java myproram arg1 arg2 ..

Can I this method in Eclipse?

Upvotes: 0

Views: 121

Answers (3)

Pascal Thivent
Pascal Thivent

Reputation: 570285

First, create a Run Configuration (Run > Run Configurations...). Then edit it, go to the Arguments tab and fill the Program arguments:

alt text http://img62.imageshack.us/img62/3419/screenshotrunconfigurat.png

Upvotes: 4

Malaxeur
Malaxeur

Reputation: 6043

Yep, firstly if you select your code you can choose to "Run as a Java Application". This will cause your application to run with no parameters, but it'll be exactly like 'java myprogram'.

Then, if you want to actually add arguments... you can create run configurations. Right click on a file, select Run As > Run Configurations. From there, you can create a new configuration for a Java Application and set the commandline arguments and VM arguments (if you need any).

Upvotes: 4

akf
akf

Reputation: 39475

Yes, you can. You need to configure the commandline arguments in the Run Dialog. You can get there by dropping down the Run menu and selecting the 'Open Run Dialog...' menu item. Once there, you can select your program task from the tree on the left pane. You will then see a set of tabs on the right. The second tab allows you to input your args.

Upvotes: 2

Related Questions