aspose file tools*
The moose likes Beginning Java and the fly likes Test Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Test Class" Watch "Test Class" New topic
Author

Test Class

Rupinder Bains
Ranch Hand

Joined: Jul 23, 2002
Posts: 65
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

Joined: Jan 31, 2003
Posts: 401
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?


doco
subhit chauhan
Ranch Hand

Joined: Jun 20, 2002
Posts: 40
put system.out.println() where ever you want to debug you java class....
Francis Siu
Ranch Hand

Joined: Jan 04, 2003
Posts: 867
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


Francis Siu
SCJP, MCDBA
subhit chauhan
Ranch Hand

Joined: Jun 20, 2002
Posts: 40
For application prog. its command prompt in windows... but for applets its java console..
No idea about Unix
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Test Class
 
Similar Threads
SUN Java in windows environment questions..
Array Problem
A simple(!) "Call by Value "Example
JUnit question
non-static variable this cannot be referenced from a static context