Home > database >  on Ubuntu jlink does not generate .bat script, only bash script
on Ubuntu jlink does not generate .bat script, only bash script

Time:05-03

I am trying to create a custom JRE with laucher scripts using this guide. I am running Ubuntu 20.04, and at the end I got only the bash script in the bin folder, but wasn't it supposed for jlink to create both .bat and bash scripts?

CodePudding user response:

Considering the question and the comments so far...

Either you go the traditional way and continue to distribute jar files. Your client can run the application on any machine that has a Java Runtime (and today that means they install the JDK as there is no JRE any more).

Or you package your application to include the JRE so the client does not have to care which version of Java they need. To make this easier, jlink and jpackage have been created. Have a look at https://docs.oracle.com/en/java/javase/17/jpackage/packaging-overview.html Just be aware Windows packages will have to be created on a Windows machine, Linux packages on a Linux machine etc. Cross-compiling is not supported.

If you prefer something like Webstart (which means automated online distribution of your application), take a look at https://openwebstart.com/

  • Related