File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

runtime error in my java progrm

 
akshay dev
Greenhorn
Posts: 19
  • 0
  • 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: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • 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: 1142
4
  • 0
  • 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
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic