如何绑定MySql数据库在任何应用程序的JAR文件? [英] How to Bind MySql Database inside a JAR file of any application?
问题描述
我准备了一个应用程序,这是一个小的演示的学生信息操纵。我已经在MySQL数据库中存储了与学生相关的信息。现在我的应用程序是100%在我的电脑上工作。但我想要的工作无处不在,而不依赖于数据库!我的意思是我只是想我的.JAR文件在哪里,数据库也应该这样做.JAR文件
I have prepared an application that is a small demo of Student information manipulation. I have stored information related to students in a MySQL DB. Now my application is working 100% on my computer. But I want that work everywhere without depending on Database! I mean I just want "WHEREVER MY .JAR FILE GOES, DATABASE SHOULD ALSO GO ALONG WITH THAT INSIDE .JAR FILE "
正在使用我的应用程序或尝试它,他们可以实现此应用程序的确切结果。
So anyone who is using my application or trying it, they can realize exact result of this application.
如何使这可能?请有人帮助我。
How can I make this possible? Please someone help me.
推荐答案
您可能需要查看 HyperSQL ,这是一个内存数据库(您需要在应用程序启动时填充)。或者查看 SQLite ,它是一个嵌入式数据库,您可以将其作为资源分发到jar中。
You will probably need to look at something like HyperSQL, which is a in-memory database (which you will need to populate at application start-up). Or have a look at SQLite, which is an embedded databsase, which you can distribute as a resource in your jar.
这篇关于如何绑定MySql数据库在任何应用程序的JAR文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!