This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Test Class

 
Rupinder Bains
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya Everyone,
You all must know that I am useless at Java by now. :roll:
BUT... How do you test a class using a console display. BUT CANNOT inplement a GUI.
Thank You
Rupes.x
 
Donald R. Cossitt
buckaroo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simplest way is from a command line in your DOS console make sure you change directory to the directory your class / java files are in then type: java whatevereFileName <enter>.
EG. C:\javaProjects\Testing> java myTestFile <enter>
Case is important.
Are you familiar with DOS 'cd' command?
 
subhit chauhan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put system.out.println() where ever you want to debug you java class....
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Rupinder
Which Operating System you use?
If you use Unix system, you can choose the console to display the statement which you use the System.out.println("") to print it out.
And I agree subhit that can use it to debug in some situations.
System.out.println("") default output is in console
 
subhit chauhan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For application prog. its command prompt in windows... but for applets its java console..
No idea about Unix
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic