a simple question-how to do "java Sample 30 5" in eclipse? [message #202324] |
Thu, 29 March 2007 17:48  |
Eclipse User |
|
|
|
Originally posted by: harmonizedchaos.gmail.com
If you use the command-line environment to compile and run a java program
called Sample.java instead of using Eclipse, you could compile by writing
"java Sample 30 5" or replace the 30 and 5 with other numbers (lets
suppose the Sample.java needs 2 int inputs). How would you do the
equivalent of that when using Eclipse?
Thanks!
|
|
|
|
Re: a simple question-how to do "java Sample 30 5" in eclipse? [message #202446 is a reply to message #202324] |
Fri, 30 March 2007 11:16  |
Eclipse User |
|
|
|
Originally posted by: eclipse5.rizzoweb.com
Este wrote:
> If you use the command-line environment to compile and run a java
> program called Sample.java instead of using Eclipse, you could compile
> by writing "java Sample 30 5" or replace the 30 and 5 with other numbers
> (lets suppose the Sample.java needs 2 int inputs). How would you do the
> equivalent of that when using Eclipse?
First of all, that command won't compile anything; it will run a class
names Sample (no package) passing in two arguments.
To run this class in Eclipse, right-click on it and choose Run > Run...
In the dialog, select Java Application from the list, right-click and
choose New. Then you can edit the various elements of the Launch
Configuration for your class, including the Arguments tab where you can
specify your command-line arguments.
Hope this helps,
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.12040 seconds