Swift/Java people - This may be a stupid question.

The W3C's epub validator is a jar file that can be executed from the command line.

Is this something that can be easily wrapped in a small swift app? I.e. can you call a jar file from a swift Mac app and pipe the output. Do you need to install Java on your Mac to do so?

I clearly haven't thought about this much but woke up wondering if I could replace this use of Docker and remembered @airspeedswift 's session at Server Side 2024.

@dimsumthinking I don't know anything about the Swift specifics of executing processes and capturing their output, but it's common for Java apps to bundle a JRE. You would need to bundle a JRE that is appropriate for each platform you intend the app to run on and figure out which one to invoke. I'm not sure though how that would play with Apple's sandboxing. Would Apple block the Java process from executing or at least require separate permission?
@hosierdavid @dimsumthinking You should be able to bundle the JRE and sign it as a helper executable. The app should be able to execute it as a subprocess with no problem. It’ll be trapped in the app’s sandbox without jumping through a bunch more hoops, but that should be okay for a validator?