File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes System.out.println on Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "System.out.println on Windows" Watch "System.out.println on Windows" New topic

System.out.println on Windows

lori smith

Joined: Mar 02, 2009
Posts: 3
Sorry if this is incredibly basic. I've looked and I can't find an answer here but I can't be the only one this is happening to:

I can't get System.out.println to print anything to the Windows console. If I run under Netbeans, the output shows just fine in the output box. But I'm trying to be a good girl and work from the command line using javac. "HelloWorld" code runs without error -- except that nothing is printed!

Does anybody have any idea what I need to tweak to get System.out.println and XP to hold hands?


Rob Spoor

Joined: Oct 27, 2005
Posts: 19651

Can you show us your code?

How To Ask Questions How To Answer Questions
lori smith

Joined: Mar 02, 2009
Posts: 3
Hi, sure, happy to show you my code. Here it is:

class TestStuff {
public static void main(String [] args) {
String whatToPrint = "Hello Goodbye";

Like I say, it runs fine and under Netbeans, the output shows in the built-in output window no problemo. But using javac from the command line, nothing happens.

Thank you, thank you, thank you if you can help......

lori smith

Joined: Mar 02, 2009
Posts: 3
OK, I think we can head this one off before it goes any further. Dumbo just figured out her mistake -- I was expecting the regular program output to be printed by running the java file via javac. I guess I was a little confused about just what the compiler would do and not do. When I run the jar file, the output is there as expected.....

Thanks anyway!


I agree. Here's the link:
subject: System.out.println on Windows
Similar Threads
maths in XML ???
Language doubt
File class and the length method
Tomcat 5 related question?