r/jailbreakdevelopers • Reader • Sep 19 '19

Java ported for iOS, looking for testers.

[Picture] [iPhone.diff]

Looking for testers to find out if the (OpenJDK/hotpot) zero interpreter is fast enough for various use cases. Zero is JIT-less, assembly-less, portable target of hotspot I’ve built because openjdk lacks a bsd_aarch64 branch/port.

Feel free to report any errors and complaints; I’m looking if it’s worth the effort to switch to port OpenJ9 or if hotspot is a good enough JVM, so feedback is very welcomed!

Install packages:

Add /opt/local/bin to your $PATH.

46 Upvotes

13 comments sorted by

10

u/Aeather Developer Sep 19 '19

Interesting! Great job on the port. Genuinely curious. What java apps you think would be beneficial on an iOS device? Or why? Just to see if it was possible?

2

u/LULShotz Reader Sep 19 '19

Sometime back I saw this post in the mobile-dev list after seeing that openjdk once supported iOS as a thing. I had a old repo with those patches, but Johan’s patches actually broke running java (and I only realize that now).

It’s more about bring back the telesphoreo project back to elucubratus; Being able to run Ruby, NodeJS, Golang, and Python is a good way bring a powerful terminal device in your pocket.

19

u/[deleted] Sep 19 '19

Real question can I play Minecraft pc edition on my phone now

8

u/ArtikusHG Developer Sep 19 '19

i came here to ask this.

fr tho, i'm sure you can't, that would require a ton more ports. though, i'm super sure you can run a minecraft server on your phone.

4

u/[deleted] Sep 19 '19

Probably

1

u/artdeell Jan 28 '22

PojavLauncher exists yknow

2

u/ArtikusHG Developer Jan 29 '22

that was 2 years ago when it didn't

7

u/Wh0ba Developer Sep 19 '19

Great job This is really awesome

But It’s painfully slow
Like a simple hello world file took 13 seconds just to compile Hopefully it can get better

3

u/Wh0ba Developer Sep 19 '19

JIT could work but there are some constraints on it
Like PPSSPP uses JIT on iOS with the help of CS_DEBUGGED kernel flag and having to do only one command at a time or something like that

1

u/Cobblob Sep 20 '19

The drawback is you can never mark a page of memory as readable, writable, and executable preventing any real JIT. You can make a page as read/write and write out you JIT code and then change the page to read/execute, but it’s a huge overhead

1

u/Cobblob Sep 20 '19

Nice! You should check out https://multi-os-engine.org/start/. Intel ported the android runtime to iOS letting you compile your java to an OAT file like android and run it on iOS

0

u/[deleted] Sep 19 '19

[deleted]

1

u/LULShotz Reader Sep 19 '19

It’s because there’s literally isn’t bsd_aarch64 in hotspot.

Implementing that would be a time sink and compatibility headache, hence this post asking if OpenJ9’s JVM would be better, since- from a glance- should be more portable (in theory).

0

u/[deleted] Sep 19 '19

[deleted]

1

u/LULShotz Reader Sep 19 '19

Same reason why there’s a macos port, not all code that compiled for linux works on bsd/darwin. Linux might have headers only specific to linux.

Hotspot uses assembly code, so a bsd_aarch64 target means that there’s maintainers for that device (such as macos, windows, and linux) with full support.

I made this post to see if your question could be solve by OpenJ9, to see if it’s JVM compiles with JIT for iOS or if hotspot is “good enough.”