完成Java项目,现在创建jar或.exe文件(用数据库) [英] Finished Java project, now creating jar or .exe file (with Database)

查看:324
本文介绍了完成Java项目,现在创建jar或.exe文件(用数据库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我刚刚完成了一个小的java应用程序,数据库和东西...
我使用Netbeans和Mysql,现在我想导出我的项目,所以我可以使用它在任何我想要的;
任何计算机,即使没有安装Mysql或Java!
所以,我试过一些程序像Launch4j或东西...但主要的问题是,即使我做的.exe文件,什么会发生与数据库?它位于我的电脑,所以如果有人试图使用我的应用程序,他无法访问数据库,所以应用程序将无法工作...

So, i've just finished a small java application, with database and stuff... I used Netbeans and Mysql, now i want to export my project so i can use it anywhere i want; any computer, even with no Mysql or Java installed! So, i've tried some programs like Launch4j or something... but the main problem is, even if i make the .exe file, what's gonna happen with the database? it's located in my PC, so if somebody try to use my application, he can't access to the database, so the application won't work...

其他词...什么是解决方案,我可以使用喜欢组合数据库与应用程序,如果可能?或者用数据库创建.exe文件...
我希望我的问题很清楚,谢谢你的回答:)

In other words...What is the solution that i can use to like "Combine" the database with the application, if it is possible? or create the .exe file with the database... I hope that my problem is clear, and thank you for your answers :)

推荐答案

您可以查看 MySQL Connector / MXJ 将您的mysql数据库嵌入到您的应用程序中。

You can look at MySQL Connector/MXJ to embed your mysql database in your application.

但是请注意,此包不再处于正在开发中:

But be aware that this package is no longer under active development:


由于需求非常低,MySQL
已停止开发和支持Connector / MXJ。

Due to very low demand, MySQL has stopped development and support for Connector/MXJ. Source and binaries for previously released versions will continue to be available from archives.

以前发布的版本的源代码和
二进制文件将继续为
。使用其他数据库,例如 SQLite H2 HSQLDB

An alternative solutation would be using another database like SQLite, H2 or HSQLDB

这篇关于完成Java项目,现在创建jar或.exe文件(用数据库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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