Thursday, September 22, 2011

Classloader exception

Few hours ago, I had probably the most stressful 15 minutes of my life when I ran my programming assignment as a final check before submission and it did nothing but clean exited when I hit the run key. I went back to the test cases I had written for the modules and checked to see if everything worked fine. I had 100% success in there. Although, my program still won't print anything... strange!
So, as any programmer would do, I put the breakpoint at the very beginning and started debugging. Everything was still working fine, except when I came to the point where I was instantiating one of the classes, I got the classloader exception. I thought, that there probably was an issue with that class, so I rebuilt the program so the .class files get regenerated. Still no luck!
Update:
I am probably the silliest person on earth.Any beginner book will tell you that classloader exception is thrown when the class loader is unable to load the class. That is, the class doesn't exist. Which made sense in my case, because I had just refactored the code and update the other file while I did that. I still don't understand how the project was compiled though :S

No comments:

Post a Comment