I have a problem instantiating a class that’s inside a custom jar file. The problem is that the project that contains this class, is being able to use the class, but once I build a jar out of the project, and try to use this jar in another project, I’m not being able to instantiate it.
for instance, this code:
System.out.println("Reached here 1");
CustomClass customClass=new CustomClass();
System.out.println("Reached here 2");
Wouldn’t create the object, and wouldn’t get print “Reached here 2”. The other problem is that I’m not supposed to handle exceptions in this class just ’cause I’m not intending to change an earlier design.
Any suggestions?
The problem wasn’t in the .jar file itself. It was in the setup of my project. I should have included the .jar file in the ext folder inside the java directory which I didn’t do. Thanks a lot for everyone’s help.