Hi guys,
Im currently doing a tutorial on java, but im getting an error
package mypkg;
public class Puppy //my class
{
public Puppy(String name){ //my constructor, every class has one
System.out.println("Passed Name is:" + name);
}
public static void main(String []args){
Puppy myPuppy = new Puppy( "Blue berry");
}
}
Here;s the error
Exception in thread "main" java.lang.ClassNotFoundException: org.sqlite.JDBC
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at mypkg.test.main(test.java:14)
I'm not sure why this is happening ?
Managed to answer a few of the questions ,from what I understand a .java file can only have one public class, it may have private classes too, the main there is a an inner class ? I dont see how constructor is being defined as a constructor.. does it just know ?
Edit: I see it has got something to do with another class on the side, is there a way to only run one class ? I don't want to run the other class at the moment.