5 ms·
That's great! Won't it make the compiled executable platform specific?
by johnydepp 10y ago
That's great! Won't it make the compiled executable platform specific?
- rcaught 10y agoWrite once, run anywhere... you've compiled it to.
- jcdavis 10y agothe generated .so file will be platform specific, but it seems like the class files will still be needed as usual
- copperx 10y agoI believe that's the whole point. From what I could gather, this is the process one would follow to get native code: .java -> javac -> .class (still cross-platform bytecode) -> jaotc -> .so native code
- Sanddancer 10y agoThere are other JVMs that already do AOT compilation. This just brings an AOT compilation option to Java. It also looks like the contained file will include both the compiled version and the normal bytecode, so that the code can be recompiled if/when necessary.
- mike_hearn 10y agoYou're intended to use it like this: either you distribute JARs and the recipient triggers the AOT compilation if they want it, or you distribute a "jlinked" JRE image that's inherently OS specific because it includes a bundled JVM. It's also possible that a future Java module format will allow the AOT compiled code images to come along for the ride next to the classfiles.