Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

System.out.println on Windows  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 command.com 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?

Thanks.....

Lori
 
Sheriff
Posts: 21421
94
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us your code?
 
lori smith
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, sure, happy to show you my code. Here it is:

class TestStuff {
public static void main(String [] args) {
String whatToPrint = "Hello Goodbye";
System.out.println(whatToPrint);
}
}

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.
 
lori smith
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

Lori.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!