Connecting Java to SQLite

I downloaded sqlitejdbc-v056.jar from

http://www.zentus.com/sqlitejdbc/

to C:\test folder in Windows XP 32-bit. And downloaded SQLite3 database in C:\test folder. Then I ran java -cp .:sqlitejdbc-v056.jar. Then I tested after compiling Test.java, but it gave me this error message:

Exception in thread "main" java.lang.NoClassDefFoundError: Test

Answers


It can't find your compiled Test.class file. You need to include its location in your classpath. Is it supposed to be in the current directory? that seems to be where you intend it to be, since your path includes '.'.

I may be mis-remembering this, but, ':' is not the path separator on Windows if I recall correctly. It is on Linux, but think it's ';' on Windows? Then try "-cp .;sqlitejdbc-v056.jar". Might be wrong.


Need Your Help

reading header of each part in multipart request in Scala Play

scala playframework multipart mixed

I am trying to extract headers of each part in multipart request using Scala play.