| Author |
An article - Oracle : Java's worst enemy ?
|
Rahul Sudip Bose
Ranch Hand
Joined: Jan 21, 2011
Posts: 637
|
|
I read this article which says "Oracle: Java's worst enemy". It also speaks favourably about how apache has made (and continues to make) significant contributions to java. Do you see anything wrong with this article ? I am looking forward to your comments.
Oracle : Java's worst enemy
|
SCJP 6. Learning more now.
|
 |
Stephan van Hulst
Bartender
Joined: Sep 20, 2010
Posts: 3050
|
|
But what Oracle did is even worse because these optimizations aren't a feature of the Java source code compiler but of the Hotspot JVM's Just-In-Time (JIT) compiler, which translates Java bytecode into native machine code at runtime.
I fail to see how that is even worse. I would rather have the HotSpot compiler break my code than javac. Now my programs may fail when they are run on Java SE 7, but at least they will work when they fix the problem.
If I distribute my program after compiling it on a broken javac compiler, it would be a whole lot more annoying. When they fix the problem, I have to recompile and update all the installations of my first version.
|
 |
Rahul Sudip Bose
Ranch Hand
Joined: Jan 21, 2011
Posts: 637
|
|
|
//Bounce
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12921
|
|
I think the article is highly opinionated, written by someone who doesn't like Oracle and who takes the JDK 7 bug and blows it out of proportion. I think the bug is not such a big deal as the author of the article tries to make out of it. There is a workaround and in a minor update that is going to be released soon, it's going the be fixed. Most people that use Java 7 will probably never be hit by the bug.
About this:
But what Oracle did is even worse because these optimizations aren't a feature of the Java source code compiler but of the Hotspot JVM's Just-In-Time (JIT) compiler, which translates Java bytecode into native machine code at runtime.
Besides what Stephan said, there are other good reasons why most of the optimizations are done in the JVM and JIT and not in the Java compiler. First of all, by letting the JVM and JIT do the optimizing, other languages that run on the JVM can automatically benefit from the optimizations too. The Java compiler and compilers for other languages can be kept relatively simple (they don't need to optimize the byte code in complicated ways). Second, the JIT knows exactly what platform and CPU the program is running on, and it can do sophisticated optimizations for that exact platform, and even do profile-based optimizations at runtime. So it's not "worse" that these optimizations are done by the JIT; on the contrary.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: An article - Oracle : Java's worst enemy ?
|
|
|