Newbie: How do I pass an argument from within Eclipse?

J

John

Hi,

while (rset.next ())
System.out.println (rset.getString (1));
System.out.println ("Hit enter to continue");
try {
System.in.read();
}
catch (Exception e) {
System.out.println ("Error: " + e.toString());
}

Can anybody tell me how to run a program interactively from within an
IDE like Ecplise? Something like the above, so that I can pass
argument to the code? Thanks!

John
 
J

John

Hi,

while (rset.next ())
System.out.println (rset.getString (1));
System.out.println ("Hit enter to continue");
try {
System.in.read();
}
catch (Exception e) {
System.out.println ("Error: " + e.toString());
}

Can anybody tell me how to run a program interactively from within an
IDE like Ecplise? Something like the above, so that I can pass
argument to the code? Thanks!

John

Arg... never mind. Just found out how to do that.

while (rset.next ())
{
System.out.println (rset.getString (1));
System.out.println ("Hit enter to continue");
try {
System.in.read();
}
catch (Exception e) {
System.out.println ("Error: " + e.toString());
}
}

But, why am I seeing 2 rows from the resultset at a time?
I hit enter and get 2 more. Shouldn't I get one at a time?

John
 
T

Tor Iver Wilhelmsen

But, why am I seeing 2 rows from the resultset at a time?
I hit enter and get 2 more. Shouldn't I get one at a time?

It could be the "console" you use sends CRLF ("\r\n"), that is to
characters when the user presses Enter.
 
Joined
Jan 28, 2008
Messages
1
Reaction score
0
passing arguments to Program using Eclipse

Hi ,

First right click on the program select Properties-->> Run/Debug Settings.

Select related file in right panel and then click on Edit button. It will open properties of selected file. In that "Arguments" tab is there . In that text area we can pass the argumetns and also configure using that .


Chowdary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top