Does anyone know how to embed an executable jar file in a macOS Cocoa Application?
I have written the backend to a desktop application in Java and I would like to embed that within a macOS Cocoa Application so that I can write a simple UI and put the end product in the Mac App Store. The backend is very independent to where it can be a black box to the Cocoa App. All I need is for the Cocoa app to execute the jar file at certain times.
I found this question which seems to be very similar to what I am trying to do: Embedding a Java runtime into a sandboxed Cocoa Mac app but I am worried that this information may be outdated now. I would hate to go figure out how to embed the JRE and jar file only to have my application fail the App Store review. Does anyone know if Apple still allows this sort of thing? I know they have been moving away from Java as much as they can.
If this method will still work, would someone mind instructing me on how to embed the actual JRE within the Cocoa app and then how to use NSTask to launch the jar file?