简体   繁体   English

创建jar文件时出现错误java.lang.ClassNotFoundException:org.sqlite.jdbc

[英]Error java.lang.ClassNotFoundException: org.sqlite.jdbc when create jar file

I created an application on Eclipse that is connected to a sqlite database that is located in the folder project. 我在Eclipse上创建了一个应用程序,该应用程序连接到位于文件夹项目中的sqlite数据库。 I'm using the xerial sqlite-jdbc driver and swing for objects. 我正在使用xerial sqlite-jdbc驱动程序并摆动对象。 When I run my application on Eclipse it works fine, but when I export the application to a single jar file it shows me the error: 当我在Eclipse上运行我的应用程序时,它运行良好,但是当我将应用程序导出到单个jar文件时,它显示了以下错误:

java.lang.ClassNotFoundException: org.sqlite.jdbc java.lang.ClassNotFoundException:org.sqlite.jdbc

I tried adding the sqlite-jdbc jar file to the classpath (I'm sure that I pressed ENTER in the manifest), running this example from xerial: 我尝试将sqlite-jdbc jar文件添加到类路径(我确定我在清单中按ENTER),从xerial运行此示例:

java -classpath ".;sqlite-jdbc-3.7.2.jar" java -classpath“。; sqlite-jdbc-3.7.2.jar”

But it always show the error. 但是它总是显示错误。 I read and downloaded an example from here: 我从这里阅读并下载了一个示例:

http://www.codeproject.com/Tips/815186/Java-JDBC-SQLite-Read-Data-from-User-selected-db-T?msg=4911364#xx4911364xx http://www.codeproject.com/Tips/815186/Java-JDBC-SQLite-Read-Data-from-User-selected-db-T?msg=4911364#xx4911364xx

It's made in NetBeans and when I create the jar file for that project it doesn't have the same problem, I noticed that the jar "sqlite-jdbc-3.7.2.jar" it's included when I create the jar file for the project, but when I create the jar file for my project it doesn't include that file. 它是在NetBeans中制成的,当我为该项目创建jar文件时,它没有相同的问题,我注意到当我为该项目创建jar文件时,就包含了jar“ sqlite-jdbc-3.7.2.jar” ,但是当我为项目创建jar文件时,它不包含该文件。

Using winrar I copied the "sqlite-jdbc-3.7.2.jar" file to the jar file of my project but it always shows the same error.(You'll think that I'm crazy trying this, but I had try a lot of things) 使用winrar,我将“ sqlite-jdbc-3.7.2.jar”文件复制到了项目的jar文件中,但始终显示相同的错误。(您会认为我很疯狂地尝试了此操作,但是我尝试了很多东西)

I had read all the question and answers on this web and other webs that presents similar or the same error, but nothing happen. 我已经阅读了该网站和其他网站上出现类似或相同错误的所有问题和答案,但没有任何反应。

If some one knows what can I will appreciate any help 如果有人知道我能为您提供任何帮助

If you are using eclipse, you may want to try Runnable JAR File Exporter 如果您使用的是eclipse,则可能需要尝试Runnable JAR File Exporter

蚀可运行罐

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQLite数据库..java.lang.ClassNotFoundException:org.sqlite.jdbc - Sqlite database ..java.lang.ClassNotFoundException:org.sqlite.jdbc “找不到类 java.lang.ClassNotFoundException:org.sqlite.JDBC - "Class not found java.lang.ClassNotFoundException: org.sqlite.JDBC java.lang.ClassNotFoundException:org.sqlite.JDBC - java.lang.ClassNotFoundException: org.sqlite.JDBC java.lang.ClassNotFoundException: 来自 xerial 的 Sample.java 程序中的 org.sqlite.JDBC 错误 - java.lang.ClassNotFoundException: org.sqlite.JDBC error in Sample.java program from xerial 错误[stderr](EJB缺省-8)java.lang.ClassNotFoundException:org.sqlite.JDBC - ERROR [stderr] (EJB default - 8) java.lang.ClassNotFoundException: org.sqlite.JDBC java.lang.ClassNotFoundException:org.sqlite.JDBC Androidstudio Java模块 - java.lang.ClassNotFoundException: org.sqlite.JDBC Androidstudio Java Module ClassNotFoundException: org.sqlite.JDBC - ClassNotFoundException: org.sqlite.JDBC Maven可部署jar“ java.lang.ClassNotFoundException:org.apache.hadoop.hive.jdbc.HiveDriver”错误 - maven deployable jar “java.lang.ClassNotFoundException: org.apache.hadoop.hive.jdbc.HiveDriver” error java.lang.ClassNotFoundException: com.mysql.jdbc.driver 错误,jar 文件已经导入 - java.lang.ClassNotFoundException: com.mysql.jdbc.driver error with jar file already imported Jar文件错误(java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver) - Jar File Error (java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM