Oracle Formally Proposes That Java Adopt Ahead-of-Time Compilation (infoworld.com)
An anonymous Slashdot reader quotes InfoWorld:
Java applications will get faster startup times thanks to a formal proposal to include ahead-of-time compilation in the platform. The draft Java Development Kit proposal, authored by Vladimir Kozlov, principal technical staff member at Oracle, is targeted for inclusion in Java 9, which is expected to be available next summer. "We would love to see this make it into JDK 9, but that will of course depend on the outcome of the OpenJDK process for this JDK Enhancement Proposal," said Georges Saab, vice president of software development in the Java platform group at Oracle, on Thursday. Ahead-of-time compilation has been a stated goal for Java 9 to address the issue of slow startup...
The proposal summary notes that Java classes would be compiled to native code prior to launching the virtual machine. The ultimate goal is to improve the startup time of small or large Java applications while having "at most" a limited impact on peak performance and minimizing changes to the user workflow.
Tests indicates some applications perform better while some actually perform worse, so it's being proposed as an opt-in feature where dissatisfied users "can just rebuild a new JDK without ahead-of-time libraries."
The proposal summary notes that Java classes would be compiled to native code prior to launching the virtual machine. The ultimate goal is to improve the startup time of small or large Java applications while having "at most" a limited impact on peak performance and minimizing changes to the user workflow.
Tests indicates some applications perform better while some actually perform worse, so it's being proposed as an opt-in feature where dissatisfied users "can just rebuild a new JDK without ahead-of-time libraries."
Penty of Enterprise software relies on byte code morphing/instrumentation and all things we get from Aspect Oriented Programming. Ahead of time compilation makes only sense in Applications that don't use such featers and should be simply part of the build process if developrs chose so and not necessarily a "language feature".
After all there are plenty of third party AoT Conpilers for the JVM.
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
If it's 'just in time' to make your app perform, does that make it a JIT compiler?
Next: I need to link between Java, C++ and C# modules.
John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
It's already been done. Symantec's compiler had a native compilation option. I build some things with old java revisions so I can use it. Like most native programs, it requires a runtime to be preinstalled. In the case of Symantec, it was the "symantec native java runtime". The most recent version I have is 3.0.
In conclusion, it's a good idea to have as an option. It's already been done, and I wonder if symantec has any patents that might get in the way of this being implemented on a broader scale.
Google steals from Oracle. Oracle steals from Google.
This sounds like ART on Android device, with the ahead of time compilation. Google has moved away from the AOT mechanism for apps because updates became a pain for end users. In Nougat, they use a "hybrid" approach, where the code that is executed most frequently gets compiled while your device is idle. So, some code will run JIT and others as compiled pieces.
This might not be as big of a concern for enterprise products.
The proposal summary notes that Java classes would be compiled to native code prior to launching the virtual machine.
If it's all compiled to native code ahead of starting the JVM, what do you need the JVM for? Their use of "native code" here is not what we usually mean. It's just "ahead-of-time" compiled libraries, same as the Android ART.
"Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
Compiles after it runs! => It = Preprocessor. Favorite pastime of C programmers? The preprocessor!
Oracle is just a misstep or two away from fully ruining Java. You couldn't ask for a better enemy.
Anons need not reply. Questions end with a question mark.
How is this different from just giving -server on the command line when invoking the JVM?
What if Java just let you compile for each system individually. I mean it would be a bit of a pain for software engineers to manage all those versions of java apps but think of the performance increases.
There's now officially no benefit to using Java.
"Write once, run anywhere" was a pipe dream from the beginning.
I never saw why compiling for different platforms was a problem. If you write in 99% ANSI C/C++ then portability is not a big deal!
There are a bunch of other problems with Java. Why not fix those at the same time as changing the compilation model?
We could call that new version of Java "Swift" or "C#".
I guess this means my favorite Java joke won't work anymore:
Knock knock.
Who's there?
.
.
.
.
.
.
Java
So, just "compilation"?
Now that Oracle has figured out how to keep anyone from doing this without paying them, how much will they charge?
Lacking <sarcasm> tags,
That is the Oracle way. Encouraging substitute goods might as well be their corporate motto.
HBI's Law: Frequency of calling others Nazis is directly correlated with the likelihood of the accuser being Communist.
I'm sure OnLive tried to harness the power of tachyons.
It did not go well. They failed before getting anywhere.
No! Java allows mediocre programmers to use huge codebases, to produce mediocre programs. That is very important for many not widely used programs, such as internal software at big corporations, medium sized government departments, etc.
Maybe Java should just stay at Java 6.
I wish they'd spend more time on improving their garbage collectors than compilation time. It can take 30 seconds to a minute to garbage collect 25GB of memory, a huge problem for servers. The G1 garbage collector (G1GC) is promising, but it's still far to buggy to use in production. If this GC issue does not get fixed, I could see it incentivizing server software to switch to C/C++.
Fast Federal Court and I.T.C. updates
I've been trying out this new ahead of time compiling thing in an obscure language - 'C' This 'C' is like java, but without most of the "java.io.foo.bar.wibble.set(42)" syntactic bullshit and overall just feels less bloated. And 'C' doesn't require a multi-GB runtime. I only have to compile ahead of time once, not on every load, and best of all, I haven't *ever* had any exceptions thrown. It is like Java without the pain.
news at 9
about damn time.
Non sequitur: Your facts are uncoordinated.
Java 16 will will be written entirely in executable machine code and will compile to source code.
If Oracle genuinely cared about Java, they would release it, and the patents to the community.
You'd literally be insane to touch it at the moment. Oracle will step on too many toes eventually, and the more toes they step on, the bigger the risk of using Java long term is. They have a long history of being d**ks, but the most recent I remember, is when they forked Redhat to make their own distro, which was basically exactly the same, but a few minor kernel tweaks, and that users paid Oracle instead of Redhat.
There is NO good reason for any open source developer to support them.
If JITing can be done up front and cached, and the Jited code shared between processes, this would make it feasible to run short lived processes that do specific tasks in a light weight manner. And that means avoiding the monolithic Java web serving processors.
The Java rhetoric has always been that creating processes is slow. Which is true, for Java. But not for C programs on *nix. DB connection is more of an issue.
Sure, there is some overhead in running up a PHP-like process, but for small to medium loads the deployment process is so much easier to manage. When a process ends, it looses all its resources. It is easy to see what resources a process is using, time it out etc. Cannot kill a rogue task safely in Java.
I'd like to think that this will be the end of PHP. But I am dreaming there.
Isn't this what the Jalapeno project did?
Religion is what happens when nature strikes and groupthink goes wrong.
When is the startup time of a Java program a problem in practice?
Not trolling - could you give me an example?
I work with Java every day, both for tooling and end products. The Java startup times are never a factor. What takes time is dependency management, loading of plugins, synchronization between systems etc, and you are likely to have them using any language. The time from initiating the process to the first line of Java code being executed is hardly measurable in the context.
Or you can write your code in C and use JNI to execute that code.
.NET/C# has had AoT (compile at installation) compilation since day 1, since .NET 1.0, since 2002. No-one uses it. For good reasons.