java程序数据库必须要jar吗,内置数据库的可执行Java应用程序(JAR)

I am developing an application with Swing and MySql. I want to distribute it to the clients, where they could run the application on their end/PC without worrying about installing MySql and other technical stuff. So, I thought of bundling JRE and MySql but then I came across Correctly distributing a Java application with database which says it is not preferable to do so. As it would increase the application size on disk, which obviously is an issue.

So, my questions are

How do I achieve the same and what tool and resources should I use.

Is SQLite a good option?

Any help is appreciated.

解决方案

In my opinion SQLite and Apache Derby (http://db.apache.org/derby/) are both good for such a plan. Some years ago i did such stuff with derby and it's still running. At that time i just packaged the folder that contained the jre, the program, libs (jar's) and the data folder of derby.

As i remember: sqlite was very easy to use whereas derby is more overhead to learn.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值