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

Best way to download data from Windows Azure Table

.net sql-server azure azure-storage

I need to download data from windows azure table storage back to a SQL Server database inside the office network every night. There could be up to 100,000 entries in the table. What’s the most effi...

Uninstall error if original install DVD is not in drive

installer wix windows-installer uninstall installaware

When trying to remove our application in Add/Remove Programs, the following error pops up, and the application fails to uninstall: