aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes runtime error in my java progrm 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 » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "runtime error in my java progrm" Watch "runtime error in my java progrm" New topic
Author

runtime error in my java progrm

akshay dev
Greenhorn

Joined: Nov 08, 2012
Posts: 19
hey everybody,
Merry Christmas to you all.
I was writing a code and i am getting a runtime error, i have tried writing another program but it stills gives the same error. I am giving the code and the error below-


and this is the output error



can anyone please suggest me what is wrong, well i dont think so i have done any mistake in program but please help me here.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18113
    
  39

akshay dev wrote:hey everybody,
Merry Christmas to you all.
I was writing a code and i am getting a runtime error, i have tried writing another program but it stills gives the same error. I am giving the code and the error below-


and this is the output error



can anyone please suggest me what is wrong, well i dont think so i have done any mistake in program but please help me here.


Basically, your JVM can't find your class files ... do you happen to have a classpath set somewhere? Or are your classes in a package?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 592
Hi, dev,
If your Testanimal.class is in c:\mytest director, then try to run it in this way:
java -classpath c:\mytest Testanimal

Hope this answer your question.
akshay dev
Greenhorn

Joined: Nov 08, 2012
Posts: 19
thanks all of you i got it, there was a problem in classpath and i fixed it thanks again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: runtime error in my java progrm
 
Similar Threads
Reference types and Overloaded methods
main() & package question
Overloaded method question
Confused in function overriding
Unable to understand reason for ClassCastException