We have deployed a Java based application for MacOS and Windows. We have now the issue that some users don't have Java installed and seem to be unable to figure out the error message and install Java on their own. This is only the problem for MacOS users, as we used Lauch4J for Windows, which redirects directly to Oracle in case Java is not yet installed. Is there any possibility to do this also for MacOS? The alternative would be to ship the application directly with JRE or make it runnable without JRE at all. What are the alternatives and which is the easiest? Thanks in advance!
-
If you distribute your app for macOS just as Jar, then yes, user's must have Java installedMarkiian Benovskyi– Markiian Benovskyi2020-07-15 13:11:38 +00:00Commented Jul 15, 2020 at 13:11
-
Have a look here: github.com/Jorl17/…Markiian Benovskyi– Markiian Benovskyi2020-07-15 13:13:34 +00:00Commented Jul 15, 2020 at 13:13
Add a comment
|
1 Answer
It's not that you don't need JRE it's that you need to package the application with it. Look into Launch4j and jpackage or javapacker for java 8.
4 Comments
timr2001
For jpackage I would need to update the java version to Java 14 right? Thats unfortunately not an option. Lauch4j works fine for Windows but doesn't support .app or .dmg creation.
Jason
Updated to include information about javapackager for java 8.
M. Prokhorov
@timr2001, why isn't it an option to update your Java? Versions are typically backwards compatible, you don't need to change your code, just the JDK version.
Jason
Well that depends on whether or not you want your codebase to use j14. It seemed like OP wanted an alternative so that is what I provided.