I'm using a Mac Pro 64bit Mojave.
Is it possible to create a
.sh or some other low-effort "launcher" for a Java program where all of the compiled code is in the "plugins" dir that does not open a terminal?
My situation is this: I'm tasked with making an old Java 1.6 project, once compiled, work under Java 7 on Mac Mojave.
Initially my issue was that the compiled launcher demanded Java 1.6 "legacy" be installed first where this is a contraint that no, we must not install other JREs before running the app.
But I figured ou that if I make a .sh file which runs the app by pointing the Java 7 binary and passing in the main plugin as an argument I can run the app successfully:
#!/bin/bash /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java \ -classpath /SOFT/corporateAppName/plugins/org.eclipse.equinox.launcher_1.2.0v2.jar \ org.eclipse.equinox.launcher.Main
If I then change the
.command I then have a runner from GUI, no need for terminal to start it.
This could be acceptable for the client if it didn't also open a terminal.
The reason I'm not instead trying to have my build generate a mac binary that does not fail with with legacy Java 1.6 needed is because I feel that that is not likely to be doable/ might require a year of work :
The common solution to this seems to be to give in and install the version of Java that macOS asks for and it will not really use it, only for init, or migrate to a version of Java in which the bug is not present (10+) neither of which are an option.
Unless there is actually a way I can change my jenkins-ant-cocoa build process in order for it to generate a launcher that would not present this bug, or also altering the binary launcher in a way that fixes this.