fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 133 forks source link

Install app as a Windows service (post-install script support) #199

Open lemonish opened 2 years ago

lemonish commented 2 years ago

How to package a spring boot jar

已打包好的 spring boot jar 如何使用该插件进行打包 如何将该应用程序注册为服务 可以开机启动

fvarrui commented 2 years ago

Hi @lemonish! You can package your app, which uses Spring Boot, as any other app. Currently JavaPackager is not able to install services, but maybe we can add post-install scripts which do all the magic. Any suggestion?

lhDream commented 2 years ago

@lemonish 打包成exe后 用 win的 sc命令创建服务

sc create TestService binpath= "c:\test.exe" displayname= "TestService" depend= Tcpip start= auto