58

A plan to bring Java to iOS | InfoWorld

 4 years ago
source link: https://www.infoworld.com/article/3407781/a-plan-to-bring-java-to-ios.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A plan to bring Java to iOS

OpenJDK Mobile would use ahead-of-time compilation to create Apple-approved executables that run without the JVM

By Paul Krill

Editor at Large,

InfoWorld | Jul 10, 2019 3:00 am PDT

A plan to bring Java to iOS
Thinkstock

A proposal floating in the OpenJDK community seeks to jumpstart Java on Apple’s iOS. The plan involves restarting work on the OpenJDK Mobile project, which is intended to build the OpenJDK classes and API for iOS and Android, said Johan Vos, CTO at mobile developer Gluon.

Vos recently posted a bulletin pertaining to these efforts. OpenJDK Mobile centers on providing the same APIs in the latest version of the OpenJDK source repository to iOS and Android, leveraging tools familiar to Java developers. The first focus, though, is on iOS, which has lacked traditional support for Java. Apple has not allowed the Java Virtual Machine to run on the platform.

[ The new Java is coming! Learn everything you need to know about what’s new in Java JDK 13. | Discover the Jakarta EE enterprise Java roadmap. | Keep up with hot topics in programming with InfoWorld’s App Dev Report newsletter. ]

The new plan for OpenJDK Mobile would entail using the GraalVM ahead-of-time compiler to compile code at build time. (Vos noted that just-in-time compilation is not an option on iOS.) Compiled Java code could then be linked with native libraries compiled for the target operating system to create executables. This already has been done for iOS, based on Java 11. Using the GraalVM Native Images and OpenJDK classes, developers can create applications that follow Apple rules. Java developers would not have to learn Objective-C or Swift to write software for iOS.

“While Java may be late in the game on mobile, the fact that it is cross-platform, created with security as a key cornerstone, and that it allows for secure connectivity with cloud services, make it a real serious language for mobile development,” Vos said.

Volume 0%
Loading ad

Java has been used for Android development from the beginning. However, Android is not Java 11-compliant and requires its own development tool – Android Studio – and procedures, Vos said. Many developers face serious issues using Java projects and libraries on Android, he said.

Also part of the plan is a synchronized fork of the OpenJDK master, which would be created using Project Skara. A Skara-based repository would be leveraged to build OpenJDK for iOS and Android.

Bringing Java to iOS has been the goal of several projects in the past decade. Other efforts included Gluon’s own Eclipse plug-in and the now-defunct RoboVM tool.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK