部署jar文件并包括外部库 [英] Deployment of jar file and including outside libraries

查看:102
本文介绍了部署jar文件并包括外部库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去的几周中,我一直在使用Java,并且我知道这个问题可能很愚蠢...

For the past several weeks I've been working with Java and I know that this question may be dumb...

我创建了一个控制台应用程序,该应用程序使用MySQL连接器更新数据库中的记录,问题是当我将其部署到jar文件并运行它时,我发现MySQL连接器丢失了.我使用JDeveloper进行此部署,并从jar导出设置中标记了该库也需要导出.我不确定可能是什么问题,欢迎任何意见.

I created a console application which is using the MySQL Connector to update records in a database, the problem is that when I deploy it to a jar file and run it I get that the MySQL Connector is missing. I used JDeveloper for this deployment and from the jar export settings I marked that this library needs to be exported too. I am not sure what could be the issue and any input will be welcomed.

谢谢.

推荐答案

您必须在主jar文件的META-INF.MF中添加lib:my-sql-connnector.jar.

You have to add lib: my-sql-connnector.jar in your META-INF.MF in your main jar file.

这篇关于部署jar文件并包括外部库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆