英文:
creating jar file with mysql database
问题
我用Java和MySQL数据库创建了一个应用程序,最后当我尝试使用NetBeans将其转换为JAR文件时,它成功转换了,但没有将MySQL连接器提取到lib文件夹中,只提取了应用程序,所以当我尝试从JAR文件中打开它时,我收到以下错误消息:
com.mysql.cj.jdbc.Driver
我该如何解决这个问题?
注意:这是我第一次遇到这个错误,我最近更新了Java版本到Java 9。
英文:
I've created an application with java and mysql database, finally when I try to convert it to jar file with netbeans, it converted but not extract mysql connector with it in lib Folder, extract application only so when I try to open it from jar file I get this error message
com.mysql.cj.jdbc.Driver
how can I resolve that
Note : It's the first time to get this error , I recently update java version to java 9
答案1
得分: 0
尝试将您的Java更新到JDK11版本,因为版本9存在编译问题。您可以查看评论。
如果您使用像Eclipse这样的环境,我推荐,导出为可运行的JAR文件,并选择“将所需的库提取到生成的JAR文件中”。
英文:
Try updating you java to version JDK11 as Version 9 had compilation issues. You can check the reviews.
If you use an environment like Eclipse which I recommend, Export to runnable jar and select 'Extract required libraries into generated jar.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论