简体   繁体   English

基于Java的独立应用程序

[英]Java based Standalone application

I am developing a standalone application for a client using Java Swing and jdbc with MySQL. 我正在为使用Java Swing和MySQL的jdbc开发客户端的独立应用程序。 I am using MySQL as the database.I want to know that how the client can install MySQL, is there a way by which the client can install MySQL in his machine,or can i distribute the MySQL setup.The client just needs the software running and do not want to go to any installation process. 我正在使用MySQL作为数据库。我想知道客户端如何安装MySQL,客户端是否可以通过该方法在自己的计算机上安装MySQL,或者可以分发MySQL安装程序,客户端只需要运行软件即可并且不想进入任何安装过程。

What is the way around with that?? 怎么回事?

Use Java Web Start to launch the app. 使用Java Web Start启动应用程序。

The MySQL installer can be invoked from an installer-desc element in the launch file. 可以从启动文件中的installer-desc元素调用MySQL安装程序。 Here is my demo. 这是我的演示。 of the JNLP API ExtensionInstallerService . JNLP API ExtensionInstallerService的代码

You're likely to find H2, HSQLDB, Derby, or SQLite to be more suitable for your deployment. 您可能会发现H2,HSQLDB,Derby或SQLite更适合您的部署。 They're intended to be embedded in other applications. 它们打算嵌入到其他应用程序中。

This might not be the simplest solution, but it is a good idea to have an installer for your application, which would take care of MySQL installation. 这可能不是最简单的解决方案,但是为您的应用程序安装一个安装程序是个好主意,它将负责MySQL的安装。 IzPack is a very reasonable installation tool, which can execute external applications (eg MySQL installer) as part of the installation process. IzPack是一个非常合理的安装工具,可以在安装过程中执行外部应用程序(例如MySQL安装程序)。 This discussion might be of some interest. 讨论可能会引起一些兴趣。

However, as mentioned in other replies, the use of an embedded RDBMS such as H2, SQLite etc., is a better choice than MySQL for a standalone application. 但是,如其他答复所述,对于独立应用程序,使用嵌入式RDBMS(例如H2,SQLite等)比MySQL更好。

便携式数据库的替代品很少: DerbySQLite

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

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