top | item 40215161

(no title)

coolius | 1 year ago

I got OpenJDK 17 to compile for iOS, but I had to disable JIT compilation as iOS doesn't allow running unsigned Code. Running the JVM itself is possible as long as the binaries are signed, and located at the correct paths. The paths issue really made me jump through hoops because Apple doesn't sign binaries unless they are bundled in Frameworks at the root of the bundle. That forced me to create symlinks to replicate the directory structure expected by the JVM while satisfying Apple's stupid policy.

Of course this whole thing only occured when I tried to submit to the App Store and the whole app was finished. I wasn't going to give up at that point.

discuss

order

indigoabstract|1 year ago

I don't use Java much these days, but for some reason I find this project inspiring. If only because of the level of commitment to get it working.

I just wanted to say great job!

hnarn|1 year ago

OpenJDK isn’t mentioned once in the apps description, and it is GPL which means this entire application may have to be GPL (IANAL)

kryptiskt|1 year ago

OpenJDK has the classpath exception in its version of the GPL, which allows non-GPL code to link to it without triggering GPL requirements.

jimbobthrowawy|1 year ago

Where did you get a non-GPL version of OpenJDK?

jevinskie|1 year ago

Alternatively, where can I get the source for the app?

karussell|1 year ago

Impressive. Can you please work together with Oracle and make this available to everyone :) ?

And did you also try to use GraalVM?

cyberpunk|1 year ago

Is there any technical reason why one couldn’t run e.g clang or go compilers in this way? I assume you’re running javac on-device?

throwaway11460|1 year ago

No technical reason, but you won't be able to run a compiled binary due to policy. You need to use an interpreter.