在java桌面应用程序中嵌入mysql [英] Embedding mysql in java desktop application

查看:200
本文介绍了在java桌面应用程序中嵌入mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不清楚关于如何嵌入mysql在Java桌面应用程序中的步骤/配置细节,以便它(应用程序)可以通过单个可执行文件安装在任何机器上,这样做设置数据库,还提供了exe运行app.Till现在我已经建立了我的应用程序使用netbeans,我已经使用mysql设置database.plz指导我进一步。

解决方案

MySQL不是嵌入​​式数据库 - 与其相关的唯一JAR是JDBC驱动程序。它需要一个安装过程,这可能能够通过Java脚本,但是该过程肯定会在您打算支持的Java应用程序之外运行。意思是,您可以关闭Java应用程序,但MySQL服务/守护程序仍在运行。



只有 libmysqld 是可嵌入的。



Firebird和Java中的嵌入式数据库 - HSQL,Derby /(不记得以前调用过的东西)。我相信SQL Server Compact Edition是可嵌入的,而SQL Server Express / MSDE不是。我不知道Oracle是否有一个可嵌入的版本....


i am not clear about steps/configuration details about how i can embed mysql in a Java desktop application so that it(application) can be installed on any machine through a single executable file and doing so sets up database and also provides an exe to run the app.Till now i have built my app using netbeans and i have used mysql to set up database.plz guide me further.

解决方案

MySQL isn't an embedded database - the only JAR related to it is the JDBC driver. It requires a installation process, which might be able to be scripted via Java, but the process will definitely function outside of the Java application you intend it to support. Meaning, you can turn off your Java application but the MySQL service/daemon will still be running.

Only the libmysqld is embeddable.

There are embedded databases - SQLite, Firebird - and embedded databases made in Java - HSQL, Derby/(can't remember what it was called before). I believe SQL Server Compact Edition is embeddable, while SQL Server Express/MSDE is not. I don't know if Oracle has an embeddable version....

这篇关于在java桌面应用程序中嵌入mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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