java桌面应用程序的自动启动?

时间:2021-08-06 12:11:55

I have created a desktop application in Java using NetBeans 6.1 and made a jar file of the application. Now I want to make it automatically start up whenever a client's machine boots up.

我使用NetBeans 6.1在Java中创建了一个桌面应用程序,并创建了一个应用程序的jar文件。现在我想让它在客户机启动时自动启动。

How do I do that?

我怎么做?

5 个解决方案

#1


This installer can create a file with "msi" extension that will behave as regular windows installer. It bundles your jar file and JRE together into single file. The program acts as a "wizard", where you configure all necessary options.

此安装程序可以创建一个扩展名为“msi”的文件,该文件将作为常规Windows安装程序运行。它将您的jar文件和JRE捆绑在一起成为单个文件。该程序充当“向导”,您可以在其中配置所有必需的选项。

Take a look at this product:Advanced Installer

看看这个产品:Advanced Installer

Good luck.

#2


There are many commercial installers which can do this http://www.advancedinstaller.com/jre-install.html

有许多商业安装人员可以做到这一点http://www.advancedinstaller.com/jre-install.html

Are you looking for a free/OS one?

你在寻找免费/ OS吗?

Thanks Krishna

#3


If you simply want to have a java application autostarted in Windows you could just create a link in the users autostart folder calling javaw the same way you'd normally call java.

如果你只想在Windows中自动启动一个java应用程序,你可以在用户自动启动文件夹中创建一个调用javaw的链接,就像你通常调用java一样。

This is just meant FYI, the other suggestions are more general, of course, but this could be the simplest solution...

这仅仅意味着FYI,其他建议当然更为通用,但这可能是最简单的解决方案......

#4


҉ works

I have found the following order best suite to take a decision for commercial or free one, to fit your needs (most of the following does auto startup + extra features):

我找到了以下订单最佳套件来做出商业或免费的决定,以满足您的需求(以下大部分内容都是自动启动+额外功能):

Order show more features on top:

订单显示更多功能:

  1. BitRock: see features i would really use this one, because it does all cross platform + Jnlp + Prerequisite

    BitRock:看看我真的会使用这个功能,因为它确实跨平台+ Jnlp +先决条件

  2. Tanukio: enter link description here

    Tanukio:在这里输入链接描述

  3. IzPack

  4. Advancedinstaller: features

  5. (optional) Jnlp web start: example (this should become future way of installing)

    (可选)Jnlp web start:example(这应该成为未来的安装方式)

Please note that, prerequisite is not mentioned, most of there feature list, which is very important to have in all of them, because many case we use third party libraries/dependencies, so the best question would be to know if they support it or not.

请注意,没有提到先决条件,大多数都有功能列表,这对所有这些都非常重要,因为很多情况下我们使用第三方库/依赖项,所以最好的问题是知道它们是否支持它或者不。

#5


Take a look at Tanuki's Java Service Wrapper. The Community version does what you need, plus a lot more.

看看Tanuki的Java Service Wrapper。社区版本可以满足您的需求,还有更多功能。

If you only need to run a Java program periodically, I like pycron, which installs itself as a Windows service and then reads a Unix style crontab file where you would enter a line that tells pycron when it needs to run the java process (eg, every night at 3am).

如果你只需要定期运行Java程序,我喜欢pycron,它将自己安装为Windows服务,然后读取一个Unix风格的crontab文件,你需要输入一行告诉pycron何时需要运行java进程(例如,每天凌晨3点)。

#1


This installer can create a file with "msi" extension that will behave as regular windows installer. It bundles your jar file and JRE together into single file. The program acts as a "wizard", where you configure all necessary options.

此安装程序可以创建一个扩展名为“msi”的文件,该文件将作为常规Windows安装程序运行。它将您的jar文件和JRE捆绑在一起成为单个文件。该程序充当“向导”,您可以在其中配置所有必需的选项。

Take a look at this product:Advanced Installer

看看这个产品:Advanced Installer

Good luck.

#2


There are many commercial installers which can do this http://www.advancedinstaller.com/jre-install.html

有许多商业安装人员可以做到这一点http://www.advancedinstaller.com/jre-install.html

Are you looking for a free/OS one?

你在寻找免费/ OS吗?

Thanks Krishna

#3


If you simply want to have a java application autostarted in Windows you could just create a link in the users autostart folder calling javaw the same way you'd normally call java.

如果你只想在Windows中自动启动一个java应用程序,你可以在用户自动启动文件夹中创建一个调用javaw的链接,就像你通常调用java一样。

This is just meant FYI, the other suggestions are more general, of course, but this could be the simplest solution...

这仅仅意味着FYI,其他建议当然更为通用,但这可能是最简单的解决方案......

#4


҉ works

I have found the following order best suite to take a decision for commercial or free one, to fit your needs (most of the following does auto startup + extra features):

我找到了以下订单最佳套件来做出商业或免费的决定,以满足您的需求(以下大部分内容都是自动启动+额外功能):

Order show more features on top:

订单显示更多功能:

  1. BitRock: see features i would really use this one, because it does all cross platform + Jnlp + Prerequisite

    BitRock:看看我真的会使用这个功能,因为它确实跨平台+ Jnlp +先决条件

  2. Tanukio: enter link description here

    Tanukio:在这里输入链接描述

  3. IzPack

  4. Advancedinstaller: features

  5. (optional) Jnlp web start: example (this should become future way of installing)

    (可选)Jnlp web start:example(这应该成为未来的安装方式)

Please note that, prerequisite is not mentioned, most of there feature list, which is very important to have in all of them, because many case we use third party libraries/dependencies, so the best question would be to know if they support it or not.

请注意,没有提到先决条件,大多数都有功能列表,这对所有这些都非常重要,因为很多情况下我们使用第三方库/依赖项,所以最好的问题是知道它们是否支持它或者不。

#5


Take a look at Tanuki's Java Service Wrapper. The Community version does what you need, plus a lot more.

看看Tanuki的Java Service Wrapper。社区版本可以满足您的需求,还有更多功能。

If you only need to run a Java program periodically, I like pycron, which installs itself as a Windows service and then reads a Unix style crontab file where you would enter a line that tells pycron when it needs to run the java process (eg, every night at 3am).

如果你只需要定期运行Java程序,我喜欢pycron,它将自己安装为Windows服务,然后读取一个Unix风格的crontab文件,你需要输入一行告诉pycron何时需要运行java进程(例如,每天凌晨3点)。