Pet.class is product of Pet.java, that what you get once you compile your source code in java file.
Pet class can't be find because you are not calling that class properly, maybe mistake in spelling or your constractor is not right.
Can you please post your code, I think we will find more errors there
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
I do not have "jpb" library so I can't test it fully, but bottom line is you are calling class "Pet" all over place but you are missing this class(looks more like a bean). I asume you downloaded this code from sowhere or you typed from book/website and just didn't check for this class. So you have to get "Pet.java" from sowhere otherwise all the calls for Pet will do nothing and triger compiler for errors
PS: you should rename "Main.java" to something more approperiate like "PetTest.java"
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
Class is compiled version of java file ready to be used. Problem with this is you can't check if you have all methods there. So where did you get Pet.class then?
peter_budo
Code tags enforcer
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
I don't have Pet.java but I have Pet.class will that help.
Yeah, that will solve the problem if it's the correct .class file.
Put this .class file in the directory where you have Main.java and compile again. (idea is to put Pet.class file in a directory that's part of CLASSPATH env var).
thekashyap
Practically a Posting Shark
811 posts since Feb 2007
Reputation Points: 254
Solved Threads: 75