Home > front end >  Is it possible to embed JDK and other requirements into runnable jar?
Is it possible to embed JDK and other requirements into runnable jar?

Time:01-25

Two days ago I got close to finishing a java program that wrote, I wanted to let some friends play with it for a bit to find flaws etc. I created a runnable jar trough Eclipse and then I used Launch4j to transform the runnable jar into a .exe It worked perfectly fine on my pc, but any other user couldn't open it. After a while I discovered that when people would install java JDK, it worked for about 40%, but this atleast pushed me in the direction of what the flaw is. Is there a way to (automaticly?) embed everything in the jar that my program is in need of? Or is there a way to determine what exactly it all is that people need for the .exe to run and what they are missing by running some pre-checks that can re-direct them to links where they can download this? I can't seem to find much on this subject, so I probably made a mis assumption somewhere, any help/clearance is appreciated!

CodePudding user response:

There is a new tool called jpackage, which should do what you want.

Also see the User's Guide.

  •  Tags:  
  • Related