0

OpenJDK11 is just a zip file. So is there a way I can include openjdk in a file with with a jar file so that I can send a program to someone and they can run it? In other words, even if they have a different version of java on their machine, when they run the code I give them, it will use the java 11 files I put with it.

*Docker isn't an option.

JustBlossom
  • 1,259
  • 3
  • 24
  • 53
  • See https://stackoverflow.com/questions/53453212/how-to-deploy-a-javafx-11-desktop-application-with-a-jre. – VGR Jul 17 '19 at 00:04

1 Answers1

2

OpenJDK11 is not just a zip file. Each platform has a different variant, for example.

jlink is the tool (introduced with jdk9, so you're good to go) that can make ready to go apps that include a shaken-down JRE. You'll need to run it for every platform you want to target.

rzwitserloot
  • 85,357
  • 5
  • 51
  • 72