Skip to main content



      Home
Home » Newcomers » Newcomers » a simple question-how to do "java Sample 30 5" in eclipse?
a simple question-how to do "java Sample 30 5" in eclipse? [message #202324] Thu, 29 March 2007 17:48 Go to next message
Eclipse UserFriend
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 #202332 is a reply to message #202324] Thu, 29 March 2007 18:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Este" <harmonizedchaos@gmail.com> wrote in message
news:16423eb21a1cc011b78769ea62e9e8c2$1@www.eclipse.org...
> 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?

See the "arguments" tab on the launch configuration dialog.
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:[howto] browse a locale file system?
Next Topic:JavaDoc and Source code linking into eclipse
Goto Forum:
  


Current Time: Tue May 06 00:16:16 EDT 2025

Powered by FUDForum. Page generated in 0.12040 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top