简体   繁体   English

如何将jar文件转换为带有MySQL的可执行文件?

[英]How to convert a jar file to an executable with MySQL in it?

I have a java application which uses MySQL as its database. 我有一个使用MySQL作为其数据库的Java应用程序。 In order to deliver the project, I need to convert it to an executable with MySQL included. 为了交付项目,我需要将其转换为包含MySQL的可执行文件。 I have tried exe4j but it doesn't allow to include the database. 我尝试了exe4j,但不允许包含数据库。 Please advice. 请指教。 The project is done in Netbeans. 该项目在Netbeans中完成。

Although it's not being actively developed any longer due to low demand, you can have a look at the MySQL-Connector/MXJ package that's meant for "embedding" your MySQL-database into your application - I recon' it still should be able to do the trick. 尽管由于需求低而不再积极开发它,但是您可以查看一下MySQL-Connector / MXJ软件包,该软件包旨在将MySQL数据库“嵌入”到您的应用程序中-我认为它仍然应该能够做到诀窍。

But to be honest, the most future-proof solution would be to switch out your database with another option, preferably an in memory database such as H2database or SQLite . 但老实说,最适合未来的解决方案是使用另一种选择来切换数据库,最好是内存数据库,例如H2databaseSQLite

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM