Skip to main content



      Home
Home » Newcomers » Newcomers » running apps with args
running apps with args [message #129974] Mon, 16 January 2006 13:47 Go to next message
Eclipse UserFriend
Originally posted by: ashiers.hfx.eastlink.ca

Hi there,

I downloaded Eclipse and decided to try it out. I wanted to run my first
app with arguements passed to the main(...) method. Where in the IDE is
the place where I enter the arguements that are to be passed to the
main(...) method when executing the app?

Alan

import javax.swing.*;

public class HelloWorld
{

/**
* @param args
*/
public static void main(String[] args)
{
if(args.length == 0)
JOptionPane.showMessageDialog(null, "You didn't include any
arguements. Nothing to display.");
else
{
for(int i = 0; i < args.length; i++)
System.out.println(args[i]);
}
}

}
Re: running apps with args [message #129986 is a reply to message #129974] Mon, 16 January 2006 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Alan,

You specify the arguments in the launch configuration for your app.
From the Run menu select Run..., select the existing launch for your
app (should be under Java Applications) or create a new one, switch to
the Arguments tab and enter your args into the Program Arguments text box.

Hope this helps,
- Jeff
Re: running apps with args [message #130105 is a reply to message #129986] Tue, 17 January 2006 09:15 Go to previous message
Eclipse UserFriend
Originally posted by: ashiers.hfx.eastlink.ca

Thanks. I was having a heck of a time trying to find where I was supposed
to enter in my arguements. Now I know.

Alan
Previous Topic:deploy with oracle driver
Next Topic:unknown error
Goto Forum:
  


Current Time: Sun Jul 20 23:56:15 EDT 2025

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

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

Back to the top