So i need to write a program that accesses and modifies an SQLite DB for a school program and am looking at the basics firstly. Now, I am looking at this to get me started: link text. The problem is that when i compile Test.java (The example code on the website) and then run the command:
java -cp .:sqlitejdbc-v056.jar Test
like it tells me to, i get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: Test
Caused by: java.lang.ClassNotFoundException: Test
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
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.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: Test. Program will exit.
Test.java, Test.class and sqlitejdbc-v056.jar are all in the same folder so they should find each other. Does anybody have an idea about what i am doing wrong?