开发者

Connecting Java to SQLite

开发者 https://www.devze.com 2022-12-17 16:58 出处:网络
I downloaded sqlitejdbc-v056.jar from http://www.zentus.com/sqlitejdbc/ to 开发者_Go百科C:\\test folder in Windows XP 32-bit. And downloaded SQLite3 database in C:\\test folder.

I downloaded sqlitejdbc-v056.jar from

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

to 开发者_Go百科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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消