正确分发带有数据库的Java应用程序 [英] Correctly distributing a Java application with database

查看:101
本文介绍了正确分发带有数据库的Java应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个Java应用程序,它使用我要分发的MySql数据库。我担心的是,要分发此应用程序,我需要假设目标系统同时安装了JRE和MySql Server。

I have this Java application which uses a MySql Database which I want to distribute. My concern is that, to distribute this application I'll need to make the assumption that the target system has both JRE and MySql Server installed.

有什么方法可以将应用程序与JRE和MySql服务器捆绑在一起,以便如果系统上尚未存在它们,则我的应用程序可以安装它们并然后运行该应用程序?

Is there any way I could bundle my application with the JRE and the MySql server so that if they aren't already present on the system, my app can install them and then run the application?

推荐答案

您可以将JRE与Java应用程序捆绑在一起,前提是要遵守某些条件。 (如果我没记错的话,这是您下载JRE时所同意的标准Sun / Oracle许可所涵盖的范围。我认为该短语是二进制分发或二进制重新分发。)

You CAN bundle a JRE with a Java application, provided that you follow certain conditions. (If I recall correctly, this is covered by the standard Sun/Oracle license that you agree to when you download the JRE. I think the phrase is a "binary distribution" or "binary redistribution".)

更新

我刚刚检查了一下,记忆正确。请参见针对Java的Oracle二进制代码许可协议的补充许可条款部分SE平台产品和JavaFX 。 (第C段最适用于您的情况。)正如我在上面所述,条件适用。

I just checked, and my memory is correct. See Supplemental License Terms section of "Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX". (Paragraph C is the most directly applicable to your scenario.) And as I said above, conditions apply.

END UPDATE

我不认为您可以捆绑免费版本的MySQL。

I don't believe that you are permitted to bundle the free version of MySQL.

我个人建议再次针对Java执行此操作,因为:

Personally, I would recommend AGAINST doing this for Java, because:


  1. 它会夸大可分发内容的大小。

  2. 它将多余的JRE副本填充到用户的光盘中。

  3. 如果有必要修补用户所拥有的捆绑JRE(不经意间),则会出现问题。 )。

  4. (老练的)用户很难选择要使用的Java版本。

  1. It inflates the size of your distributable.
  2. It fills the user's disc with extra copies of the JRE.
  3. It presents a problem if it becomes necessary to patch the bundled JRE that the user has (unwittingly) installed.
  4. You are making it difficult for the (sophisticated) user to choose which version of Java to use.

这篇关于正确分发带有数据库的Java应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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