console in eclipse

G

Guest

I spend ~1 hour to answer my question with no avail. please bare with
me for this dumb question.

How can I let eclipse to show the System.out.println to show its
"console" window?

What I tried:

Created a hello world program, which has System.out.println("Hora!");
when i run the program, Console window showup with gray title with

HelloWorld [Java Application] C:\Program Files\Java\jre1.6.0_02\bin\javaw.exe (date)

but the main window stays blank.

I modified code to have for(int i=0; i<100; i++) and with the variable
window i can confirm that the value of i keep increasing. but it doesnt
show the message.

I checked that I can read what i typed on the console window through
System.in.

I also modified Java Project's property, Run/Debug setting, JRE, and
went to set Runtime JRE to be alternate, and Java executable to be java,
instead of javaw, assuming that javaw is eating the stdout somehow.
this didnt change anything.

Could anybody suggest what else went wrong?

Thank you very much in advance.
 
A

Andrew Thompson

I spend ~1 hour to answer my question with no avail.  please bare with
me for this dumb question.

Probably not a dumb question, but I cannot say
I entirely understand you.
How can I let eclipse to show the System.out.println to show its
"console" window?   ...
but the main window stays blank.

Yes, it would. System.out.println does not write to
any GUId element (such as JFrame or JWindow) but to
'standard out'.

Note there are 'update' problems when trying
to dump a series of values to a GUI.

To help you further, I would probably need an
SSCCE* to better understand the problem.

* <http://www.physci.org/codes/sscce.html>
 
J

Jeff Higgins

yosuke wrote
How can I let eclipse to show the System.out.println to show its
"console" window?

What I tried:

Created a hello world program, which has System.out.println("Hora!");
when i run the program, Console window showup with gray title with

HelloWorld [Java Application] C:\Program
Files\Java\jre1.6.0_02\bin\javaw.exe (date)

but the main window stays blank.

I modified code to have for(int i=0; i<100; i++) and with the variable
window i can confirm that the value of i keep increasing. but it doesnt
show the message.

I checked that I can read what i typed on the console window through
System.in.

I also modified Java Project's property, Run/Debug setting, JRE, and
went to set Runtime JRE to be alternate, and Java executable to be java,
instead of javaw, assuming that javaw is eating the stdout somehow.
this didnt change anything.

Could anybody suggest what else went wrong?

Thank you very much in advance.

I was able to make the System.output not appear in the console
by setting the foreground color to the same as the background color
in the Preferences : Run/Debug : Console dialog.

JH
 
J

Jeff Higgins

yosuke said:
How can I let eclipse to show the System.out.println to show its
"console" window?

What I tried:

Created a hello world program, which has System.out.println("Hora!");
when i run the program, Console window showup with gray title with

HelloWorld [Java Application] C:\Program
Files\Java\jre1.6.0_02\bin\javaw.exe (date)

but the main window stays blank.

I modified code to have for(int i=0; i<100; i++) and with the variable
window i can confirm that the value of i keep increasing. but it doesnt
show the message.

I checked that I can read what i typed on the console window through
System.in.

I also modified Java Project's property, Run/Debug setting, JRE, and
went to set Runtime JRE to be alternate, and Java executable to be java,
instead of javaw, assuming that javaw is eating the stdout somehow.
this didnt change anything.

Could anybody suggest what else went wrong?

Thank you very much in advance.

Another way I was able to cause the symptom you describe:
In the Common tab of the Run dialog deselect 'Allocate Console'
an select the 'File' checkbox and specify a place to redirect
the Standard out to.
 
S

sebastian.laskawiec

I spend ~1 hour to answer my question with no avail. please bare with
me for this dumb question.

How can I let eclipse to show the System.out.println to show its
"console" window?

What I tried:

Created a hello world program, which has System.out.println("Hora!");
when i run the program, Console window showup with gray title with

HelloWorld [Java Application] C:\Program Files\Java\jre1.6.0_02\bin\javaw.exe (date)

but the main window stays blank.

I modified code to have for(int i=0; i<100; i++) and with the variable
window i can confirm that the value of i keep increasing. but it doesnt
show the message.

I checked that I can read what i typed on the console window through
System.in.

I also modified Java Project's property, Run/Debug setting, JRE, and
went to set Runtime JRE to be alternate, and Java executable to be java,
instead of javaw, assuming that javaw is eating the stdout somehow.
this didnt change anything.

Could anybody suggest what else went wrong?

Thank you very much in advance.

In my applications I have always created special panel with debugging
information. Another way is to create logging system...
 
J

Jonatan Kazmierczak

Please run your app outside Eclipse - just in console. You should see
results and it does mean something is wrong with your workspace in Eclipse.
 
G

Guest

How can I let eclipse to show the System.out.println to show its
"console" window?

Well very embarassing outcome. I reinstalled jdk, and now both stdout
and stderr shows up to the console. I apologize for bring up my silly
trouble that i could have saved myself.
 

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
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top