2

I am developing an application using spring boot with embedded tomcat. Once I build this app in to jar file, I can run the application without any issue. However, I need this application to be wrapped as a windows executable file. And my requirements are as follows.

  1. Should be able to wrap the jar file as a windows exe file
  2. All class files should be hidden or encrypted

Has anyone done this before? Any suggested tool for this?

Yasitha Waduge
  • 13,180
  • 5
  • 35
  • 42
  • 1
    http://stackoverflow.com/questions/147181/how-can-i-convert-my-java-program-to-an-exe-file probably works with the spring boot fat jar version. Encryption not so much. But maybe you're satisfied with hiding them in the exe. – zapl Nov 06 '15 at 03:58
  • 1
    have you looked into http://launch4j.sourceforge.net/ – Jos Nov 06 '15 at 03:58
  • Thanks for the suggestions, the exe generated from luanch4j can be opened using winrar or any other archiving software and class files can be browsed easily. Most of the tools simply hides the jar file inside the exe, which is not enough for me.. – Yasitha Waduge Nov 06 '15 at 04:03

1 Answers1

1

UPDATE Thanks to Dmitry in the comments. There has been an article released since this answer with instructions on how to use excelsiorjet specifically with Spring Boot.

https://www.excelsiorjet.com/kb/38/

It's a paid tool(Can be free or reduced cost based on your reason for using it and company size) but for your requirements this seems to be a pretty good option.

http://www.excelsiorjet.com/

Quote from their site

"Excelsior JET enables you to distribute and deploy your Java™ applications as optimized native executables that start and work faster, do not depend on the JRE, and are as difficult to reverse engineer as if they were written in C++."

I used this like 3 or 4 years ago but we weren't too worried about it being decompiled so we ended up using launch4j. I don't remember any problems with it just we didn't wan't to pay how much it cost.

Zergleb
  • 2,212
  • 15
  • 24