AOT Compiler for Java RoboVM Gets an Upgrade
- By John K. Waters
The latest edition of the RoboVM ahead-of-time (AOT) compiler and runtime library for Java is now available. The 1.8 release was timed to coincide with the release of Apple's iOS 9 mobile OS and Xcode 7 IDE, product designer Hans Larsson said in a blog post. The company has finished "+95 percent" of the bindings work, Larsson said, except for the new tvOS and watchOS 2 APIs, which will be coming in the near future.
RoboVM has been supporting Java 8 lambdas and method references for more than a year. Starting with this release, the tool will require JDK 8 for compilation. All templates have been updated to use Java 8 by default, including the cross-platform template, which includes an Android sub-project. "There, we use the awesome RetroLambda (a backport of Java 8's lambda expressions to Java 7, 6 and 5) to get around limitations of ART/Dalvik," Larsson wrote.
"At this point, we'd strongly suggest to give Xcode 7 a try and recompile your iOS apps for iOS 9," Larsson warned. "If you have previously submitted an app, it should just work on iOS 9. If you want to use the latest and greatest optimizations in RoboVM or the new APIs, update your RoboVM install and resubmit your app!"
This release does not yet support Java 8 runtime classes. "We are currently evaluating ways to fix this issue as well," Larsson added.
Developed by Swedish company Trillain Mobile, the open-source RoboVM is designed to bring Java and other JVM languages to iOS. When the first stable version of the product was released in April, the company said its goal was to "turn the world's 10 million Java developers into cross-platform mobile developers by making Java 8 work on both iOS and Android devices."
The RoboVM, which is based on the Android runtime, is designed to translate Java bytecode to ARM or x86 machine code without being interrupted. The result is code that runs directly on the target CPU. Java developers building software for iOS are the company's primary targets, but RoboVM can also produce Linux and Mac OS X x86 executables, the company has said.
In addition to Java itself, the RoboVM supports some alternative JVM languages, including Scala, Kotlin, Groovy, and Clojure on both iOS and Android. It integrates with several popular IDEs, including Eclipse, IntelliJ IDEA and Netbeans, and also provides a command-line option. And it supports the Maven and Gradle build automation tools, as well as the Jenkins continuous integration server. The iPhone 6s is the new default simulator selection.
Eclipse is actually the product's default development environment. A RoboVM for Eclipse plugin, which integrates the AOT compiler with the Eclipse Java IDE, is available from the Eclipse Marketplace.
The open-source RoboVM project tools are GPLv2 licensed. The runtime component is licensed primarily under the Apache License v2.0. Trillain Mobile maintains the open-source RoboVM technology, and sells commercial licenses and additional support packages.
John K. Waters is the editor in chief of a number of Converge360.com sites, with a focus on high-end development, AI and future tech. He's been writing about cutting-edge technologies and culture of Silicon Valley for more than two decades, and he's written more than a dozen books. He also co-scripted the documentary film Silicon Valley: A 100 Year Renaissance, which aired on PBS. He can be reached at email@example.com.