SubstrateVM

Bob Vandette bob.vandette at oracle.com
Fri Jan 26 15:17:46 UTC 2018


I’m a big fan of the SubstrateVM work that Oracle Labs is doing.

This technology consumes a closed world set of Java jar and class files and
generates a single self contained executable capable of running the application.
I built a small self contained HelloWorld.java program in approx 3MB.

SVM eliminates classes that are not referenced and pre-initialized classes resulting
in a much smaller executable image and faster startup than is currently available
with general purpose Java runtimes.

All of this good news comes, of course, with a list of caveats.  SVM can only provide
these benefits when all classes required by an application are known at image
creation time.  This puts limits on what can be done via reflection.  Here’s a detailed
list of this limitation along with others:

https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md <https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md>

SVM doesn’t currently support iOS or AARCH64 but since Mach OSX on x64 is
available and Graal has preliminary support for AARCH64, iOS on-device support is not
out of reach.

If anyone is interested in more information, here are some additional pointers:

http://www.oracle.com/technetwork/java/jvmls2015-wimmer-2637907.pdf <http://www.oracle.com/technetwork/java/jvmls2015-wimmer-2637907.pdf>
https://github.com/oracle/graal/blob/master/docs/Publications.md <https://github.com/oracle/graal/blob/master/docs/Publications.md>

Here’s the public open source tree:

https://github.com/oracle/graal/tree/master/substratevm <https://github.com/oracle/graal/tree/master/substratevm>

Some recent improvements in reflection support have been added to SVM.
Here’s a slide on this new work.



Bob.


> On Jan 24, 2018, at 11:15 AM, Johan Vos <johan.vos at gluonhq.com> wrote:
> 
> Hi,
> 
> I am wondering if anyone has specific thoughts on SubstrateVM.
> The current OpenJDK Mobile deliveries bring us the native class files and
> VM (hotspot-based).
> On iOS, the next step is then bundling everything (including custom classes
> and resources) into a single executable.
> 
> This is more or less what SubstrateVM is doing, but there are some
> limitations (requires a Java 8 version with JVMCI, no support for iOS at
> this moment).
> 
> - Johan



More information about the mobile-dev mailing list