Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

runtime error in my java progrm

 
akshay dev
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Pie
Posts: 20892
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Himai Minh
Ranch Hand
Posts: 1229
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks all of you i got it, there was a problem in classpath and i fixed it thanks again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic