简体   繁体   English

如何为用netbeans编写的项目创建安装文件?

[英]How to create a setup file for a project that was written in netbeans?

I have created a GUI application using Netbeans and it has a connection to a database( localhost). 我使用Netbeans创建了一个GUI应用程序,它与数据库(localhost)有连接。

Now I want to be able to distribute it as software. 现在我希望能够将其作为软件进行分发。

Is there any way to produce a setup file for the Netbeans project? 有没有办法为Netbeans项目生成安装文件? and how can I distribute a Netbeans project which uses a MySQL database? 以及如何分发使用MySQL数据库的Netbeans项目?

how can I distribute a Netbeans project which uses a MySQL database? 如何分发使用MySQL数据库的Netbeans项目?

You might want to get familiar with NSIS . 您可能想熟悉NSIS NSIS will enable you to automate the installation process. NSIS将使您能够自动执行安装过程。

Your installation process will have to do the following: 您的安装过程必须执行以下操作:

  • Check that the Java Runtime Environment is the same version you used or higher. 检查Java Runtime Environment是否与您使用的版本相同或更高。
  • Install your application JAR file somewhere. 在某处安装应用程序JAR文件。
  • Install the MySQL version that your application requires 安装应用程序所需的MySQL版本
  • Create and initialize the tables for your application. 为您的应用程序创建和初始化表。

Your installation process can do the following: 您的安装过程可以执行以下操作:

  • Create an uninstall executable. 创建卸载可执行文件。
  • Add an icon so that the user can start your application. 添加图标,以便用户可以启动您的应用程序。

This installation process will take some time to develop and test. 这个安装过程需要一些时间来开发和测试。

You probably want to use an installer. 您可能想要使用安装程序。 Have a look at: 看一下:

There are many others but I hope this can help you... 还有很多其他但我希望这可以帮助你......

Use the solution made by the suppliers of Java - Java Web Start . 使用Java - Java Web Start供应商提供的解决方案。

  • The deployJava.js (described in the linked page) ensures the user has the minimum JRE needed to launch the app. deployJava.js (在链接页面中描述)确保用户具有启动应用程序所需的最小JRE。 & MySQL. 和MySQL。
  • Launch the app. 启动应用程序。 using Java Web Start. 使用Java Web Start。
    • Reference an installer-desc extension for installing the DB. 引用installer-desc扩展以安装DB。 Store any set-up details into the PersistenceService for later use. 将任何设置详细信息存储到PersistenceService以供以后使用。

JWS works on all major platforms for which J2SE is available and also provides.. JWS适用于J2SE可用的所有主要平台,并且还提供..

..many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions.. ..很多吸引人的功能,包括但不限于启动屏幕,桌面集成,文件关联,自动更新(包括延迟下载和程序化控制更新),按平台,架构或Java版本,配置对本机和其他资源下载进行分区运行时环境(最小J2SE版本,运行时选项,RAM等),使用扩展轻松管理公共资源。

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

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