1

I am looking at a way to package java application as an installer for windows

I looked at this example and I was able to achieve it - https://github.com/jonashackt/springboot2exe

Simply put, this is the command that I am executing currently to generate a package:

javapackager -deploy -native exe -outdir ./executable -srcfiles springboot2exe-0.0.1-SNAPSHOT.jar -outfile springboot2exe-0.0.1-SNAPSHOT -name springboot2exe-0.0.1-SNAPSHOT -title "Spring Boot 2 .exe" -appclass org.springframework.boot.loader.JarLauncher -v

But the question I have is around preuninstall steps that I want to include. For example killing the application just before uninstalling it is my priority.

Even if I can run a simple taskkill command my requirement will be met.

Note: I tried Inno Setup, launch4j etc but they are starting the process as java.exe or javaw.exe which is not something I am looking for. When I use the javapackager I am able to give an exact process name instead of identifying it as java.exe or javaw.exe

Chandan
  • 640
  • 4
  • 10

0 Answers0