Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Java

'Java 9, It Did Break Some Things': Oracle Bod Admits To Developers Still Clinging To Version 8 (theregister.co.uk) 251

Java has a problem -- the language and platform is evolving faster than ever, but many developers are stuck on the five-year-old Java 8. From a report: So why have developers not upgraded? Simply, Java 9 introduced major changes, including internal restructuring, new modularity (known as "Project Jigsaw"), and the removal of little-used APIs. These changes broke code, and even developers who are happy to make the necessary revisions have dependency issues. "We have problems with libraries that do not yet support the latest versions," said one QCon attendee.

"I want to explain why it was necessary," said Oracle's Ron Pressler, part of the Java platform group developing the language and lead for Project Loom. "There are billions of lines of code in Java, and Java 9, it did break some things. The reason is that Java is 20-something years old. It will probably be big and popular in another 20 years. We have to think 20 years ahead. The way the JDK was structured prior to Java 9 was just unmaintainable. We could not keep Java competitive if we had not done that change. That was an absolute necessity."

This discussion has been archived. No new comments can be posted.

'Java 9, It Did Break Some Things': Oracle Bod Admits To Developers Still Clinging To Version 8

Comments Filter:
  • by Gravis Zero ( 934156 ) on Thursday March 07, 2019 @02:25PM (#58232818)

    Java: works now, breaks later.

  • Just a quick question, sorta on topic:

    If you are a Java guy - would you start anew with Java today or pick something else? (Scala, Kotlin, ... Go, Python, whatever).
    Que opinions below, and thanks for that.

    • by DickBreath ( 207180 ) on Thursday March 07, 2019 @03:21PM (#58233236) Homepage
      > If you are a Java guy . . .

      Yes.

      >would you start anew with Java today

      Yes.

      Java has excellent development tools. Fantastic story on refactoring of large code bases.

      Java is very mature. Battle tested. Industrial Strength. Java has a history of backward compatibility better than most other languages. Especially Python 2 / 3, just to pick one example.

      Java has an industrial strength managed runtime platform. First the Java (or Scala, Kotlin, etc) compiler translates your source code into JVM bytecode. That bytecode is platform neutral. When you start your program on the JVM (Java Virtual Machine), it initially runs by interpreting your bytecode. All your functions are dynamically profiled for cpu usage. The JVM watches for a CPU hotspot. That is, some function that is getting a higher than average cpu utilization.

      As soon as the JVM detects a hotspot, that code is immediately dynamically compiled to native code by the C1 compiler. The C1 compiler rapidly generates un-optimized native code. That code is also scheduled by be recompiled by the C2 compiler in the near future.

      Before long, the C2 compiler comes along and spends significant time compiling that code into highly optimized code. In aggressively inlines code. It is able to do optimizations that no "ahead of time" compiler (such as C) can do. This is because the C2 compiler can see the "entire" program. That is, all possible code that makes up the entire program which is running. So the C2 compiler can make changes that an ahead of time compiler cannot make. Even though different parts of the entire running system may be been written by different authors, at different periods in history. Furthermore the C2 compiler can compile into code that is SPECIFICALLY for the processor you are running on, including any processor specific extensions, like SSE2, etc. Again, something an ahead-of-time compiler (like C) cannot do and be able to run on all x86 processors. (But remember JVM bytecode runs on any JVM, even on microprocessors not yet invented today -- without recompiling your source code.)

      Now imagine this. Your function calls My function. Both your and my function are dynamically compiled, and C2 optimized Your function by inlining My function into your code. Next, for some reason, My code is dynamically reloaded and updated within the running JVM. Now Your function has a stale copy of My old code. The JVM immediately switches Your code back to running Your bytecode via an interpreter. Before long, if your code is still a cpu hotspot, it will again get recompiled first by C1, and then later by C2.

      Java's C2 compiler has been described as being probably one of the most sophisticated compilers there is -- even though its "source" language is JVM bytecode.

      Next is Java's GC. Like Java's native compiler, Java's GC is the product of two decades of research by many researchers (due to the platform being open for many years). Java offers multiple GC choices. Each garbage collector offers multpile knobs for tuning your workload to run best. There presently is one company (Azul Systems) that makes a proprietary Java runtime with a proprietary GC that handles memory heaps of HUNDREDS of GIGABYTES. (yes, you read that correctly) And has only 10 ms GC pause times. The latest thing is Red Hat's Shenandoah GC which can handle several TERABYTES of memory with 10 ms GC pause times. Also the new ZGC that similarly handles TERABYTES of memory.

      Why such big memory heaps? Because Java can run concurrently on many CPU cores (the most I've heard of is 768 cores) with lots of memory. Yes, folks, Java is used for SERIOUS workloads.

      Even if you don't like Java the language, other languages compile to JVM bytecode -- and many can all interoperate with each other. The JVM (java runtime) is an industrial strength battle tested runtime for serious workloads.

      Please call me when your Python or Node.js can do that.

      I hope that answers your question.
      • by eddeye ( 85134 )

        The JVM (java runtime) is an industrial strength battle tested runtime for serious workloads.

        Java, the code Mutilator [youtu.be]! It's a monster truck you can pour in your code!

        Java is like refactoring your code with a lawnmower! It's like programming on a 300 foot tall pony covered in chainsaws! Java - it's got what code craves!

      • Just a question re your handle. Did you see yourself writing serious comments when you signed up with a Reddit-style username?!!
    • Just a quick question, sorta on topic:

      If you are a Java guy - would you start anew with Java today or pick something else? (Scala, Kotlin, ... Go, Python, whatever). Que opinions below, and thanks for that.

      I would pick Java again but for the GUI stuff I would do it all in JavaFX instead of Swing. Swing for me is the most annoying part of Java. Everything else is fine. I do desktop applications in Java.

      • I hate to say, but Swing is possibly where the "write once, debug everywhere" mantra got started. I have done a few Swing applications and have experienced having to make small tweaks for some platforms.

        I have not tried FX yet.

        If starting something new, I would seriously consider whether it should even be a desktop app instead of a web app. Web apps have zero install and zero maintenance at the end user's workstation.
    • The question does not make much sense.
      a) Scala and Kotlin did not exist that time
      b) Scala and Kotlin run on the JVM and use the Java infrastructure

      The answer would probably be Groovy, or a combination of Groovy and Scala. Scala for the internals as a superiour replacement for Java, and Groovy to glue it together and for the UI.

      Kotlin has in my eyes no real advantage over Java, except cleaning up the syntax by not requiring public/private/final everywhere because the default chose by the compiler is "the rig

    • by sad_ ( 7868 )

      just like in real life, it pays to be multi langual.
      yes, i would pick up java, the (oss) ecosystem is fantastic.
      but i would also take a language on the side.

  • I greatly dislike breaking changes but sometimes it is necessary. Backward compatibility do the dawn of platform time gets increasingly expensive in every way. Technical debt exists here to, languages are not immune.

    I was reluctant to move to Python 3, but now I see that this had to happen. Substituting iterators for lists in the APIs was essential to make it scalable to big data. Its not just for parsing little log files anymore.

    That binaries break on every release of Scala is a defect in that platform. Ye

    • by Luthair ( 847766 )

      I was reluctant to move to Python 3, but now I see that this had to happen. Substituting iterators for lists in the APIs was essential to make it scalable to big data. Its not just for parsing little log files anymore.

      Why not simply create new APIs and deprecate the old old ones.

    • by sjames ( 1099 )

      Actually, Python 2.7 supports iterators.

  • It sounds like Java 9 is the Windows Vista version of Java: it broke backwards compatibility and made users apprehensive to upgrade yet despite that, it was absolutely necessary to increase the quality and the long-term maintainability of the product. Assuming that they didn't make any other major changes that created significant difficulties in upgrading past version 9, I think I agree that Java will be better in the long-term for these changes.
    • Java is now version 11, with 12 out Real Soon Now.

      Java 9 did have a major, but necessary breakage. But Versions 10, 11, and 12 should not create too many problems for code that run on Java 9.

      None of my Java programs, a few at least 15 years old, had any problems on on Java 9 or later!

      Probably only developers that broke the rules, and used non public APIs had significant problems with Java 9.

      • Probably only developers that broke the rules, and used non public APIs had significant problems with Java 9.

        The article mentions that a lot of developers have dependencies in their Java applications that have not been updated to work with Java 9. Therefore, even if you're fastidious about using standard Java APIs and avoid using deprecated classes and methods, apps with many dependencies on third-party libraries may have a higher likelihood of breaking during an upgrade.

  • Why would anyone make the effort to port to a non-long term support version (e.g. 9, 10)? By the time your application container supports those versions (some still don't) and your application would be ported to those versions they are already going off support.

    The entire support life cycle for Java 9+ along with the change in licensing are just a collection of not terribly bright ideas from Oracle. There's a reason that Azul, IBM, Redhat, etc. are offering extended support for Java previous versions.
  • by bradley13 ( 1118935 ) on Thursday March 07, 2019 @03:04PM (#58233118) Homepage

    Grumpy old man here, but a Java developer. Java is not, and never will be a functional language. Nonetheless, Java 8 just had to introduce lambda expressions, so that wannabes could kinda, sorta pretend that Java was functional. The main effect of lambdas, however, is to hide data types, so that weak developers don't actually know what interfaces and data types they are using.

    So, doubling down on stupid, they introduce "var", so those weak developers really don't have to know what types they're using. Java will figure it out, or you can play pinball till it works.

    Project Jigsaw, was it really necessary? Maybe, but I'm not entirely convinced. Certainly, the new module system is a PITA, since you now have to deal with both module-paths and class-paths, plus of course getting the permissions right.

    Now, I know that Java is used for a lot of backend stuff, but JavaFX finally made Java actually really good at GUIs. Swing was a buggy mess that no one seemed to want to fix, but JavaFX got a lot of things really right. So, of course, Java 11 removed JavaFX from the core, making it a PITA precisely because of the module system introduced in Java 9.

    - - - - -

    Here's the important bit: Nowadays, I am a college professor, and I am faced with a problem: Students new to programming can no longer start with a current version of Java - the changes in Java 9/10/11 have made things just too complex for new users. I have rolled back to Java 8 for the moment. I have spoken with a number of other college level Java instructors, all of whom feel the same way.

    The long term question will be: what language do we teach in our programming courses? It is entirely possible that we will move to a different language.

    When your language is no longer being taught in schools, well, that's the beginning of the end.

    • Grumpy old man here, but a Java developer. Java is not, and never will be a functional language. Nonetheless, Java 8 just had to introduce lambda expressions, so that wannabes could kinda, sorta pretend that Java was functional. The main effect of lambdas, however, is to hide data types, so that weak developers don't actually know what interfaces and data types they are using.

      So, doubling down on stupid, they introduce "var", so those weak developers really don't have to know what types they're using. Java will figure it out, or you can play pinball till it works.

      I find lambda expressions infuriating. I've done Java for a long time, sticking to the original OO paradigm. Then a smart ass kid decided to refactor / rewrite a bunch of code I have to maintain and extend using lambda expressions all over the place. Probably because it's "the cool new thing" or whatever. For the first few times it felt like reading a foreign language.

      Why does Java have to be "functional" and who cares? They keep on going this way, they'll make it into a C++-type mess.

      • I find lambda expressions infuriating.

        Never understood this. Why would anyone intentionally give up the opportunity to compartmentalize code that for all they know might be nice to reuse later into a separate real function? Seems like the worst kind of tradeoff you could make coding any non-trivial system.

    • I saw a demo the other day that leveraged many of the new features of java 11, in an updated framework, etc. So much was hidden that it was very non-intuitive on what was happening in the code. The engineer demoing this saw this as a good thing, as very few lines of code were needed to implement some impressive functionality, but any attempt to understand it would have been difficult at the surface. That is where I see things going sideways with Java.

      • by Luthair ( 847766 )
        Wasn't one of the original design principals to not hide too much, e.g. the developer is expected to know the difference between an array, an array list, and a linked list and when each ought to be used?
    • by Luthair ( 847766 )
      Make them opaque somehow? I recall 20-years ago professors deciding they didn't want new students to deal with the complexity around IO in Java and wrote a library for it.
    • by MobyDisk ( 75490 )

      Caveat: I haven't done Java since ~2000, when Java was at version 0.9, in the days of AWT, before Swing existed.

      It's interesting that you say Java programmers hate "var" and "lambdas", whereas my experience with C#, C++, and JavaScript programmers is that they are eating it up. C# programmers prefer:
      var d = new Dictionary<string, int> over the more verbose form.
      They prefer a lambda over a loop:
      var x = collection.Find(elem => elem.Age > 15)

      What happened in Java that these things are not simply i

      • by Kjella ( 173770 )

        What happened in Java that these things are not simply intuitive and awesome?

        My guess why he's annoyed is that "var" makes you way more dependent on IDE support. Now this is just plain redundant:

        Dictionary<string, int> d = new Dictionary<string, int>

        but this is not:

        var d = SomeClass.foo();

        What's d now? Something defined somewhere else far, far away. If you have a competent IDE you'll know almost instantly what type it is, if you still swear to random text editor you're screwed.

        Lambdas are neat in that you don't need to clutter everything with a zillion helper functions. I very much prefer lambda LINQ queries for example. But if you're a maintainer and is tryin

        • var d = SomeClass.foo();

          This kind of code can be extremely annoying.

          I very much prefer lambda LINQ queries for example.

          LINQ is quite beautiful and I wish more people knew about it. Being able to write SQL straight in the code is sweeter than sugar. People do very confusing and strange things with it, though.

      • In Java it looks more or less simply exact the same ... -> than => and thats it.
        It is just grumpy idiots complaining (sorry if that includes the college professor above)

        Heck when we used IntellJ with Java 7, it displayed complicated anonymous classes as text in lambda style.

        Or is this something about Java culture?
        Probably. Everyone who is not programming in Java is bitching about Java. And meanwhile all Java developers are so insecure that they believe: there must be something true with that bitching

    • I think var should be banned in any sane development environment, and should never have been put into Java.

      I have found lambdas very useful in a couple of use cases, such as when you need to pass a function for special functionality -- far better than defining a class to hold the function.

      • The problem is: you are defining a class, it's just hidden from you. Lambdas in Java look like functional programming, but it's only a syntactical illusion. Java is not functional; the closest it comes is the pale shadow you see in reflection.

        Lambdas are convenient, but IMHO fundamentally evil.

        • I was making no comment wrt 'functional programming', merely that I had found lamdas useful in Java.

    • Are they taking your course "exclusively" to learn Java, or to code? Limit the Java curriculum if it's the latter.

      Teach on 8. Give some bonus exercise/home-work on newer versions for the truly interested.
      Then teach them some other power-house languages to compensate. There's a healthy handful.

      I absolutely hated Java during my college days, yet I'm doing perfectly fine as a professional software developer. I just don't look at Java-centric jobs. If someday that's all I can get a job in, then I'll hunker down

    • Why not Delphi? It has even a free implementation, the Free Pascal Compiler and the Lazarus IDE.
      The Pascal language was created precisely to teach programming... in 1972, OK, but nonetheless Delphi has vastly improved it since. And it's still evolving.

    • The main effect of lambdas, however, is to hide data types, so that weak developers don't actually know what interfaces and data types they are using.
      That is nonsense. You pass lambdas as arguments to functions. And the datatype of the parameter is clearly given in the functions/methods parameter list.

      So, doubling down on stupid, they introduce "var", so those weak developers really don't have to know what types they're using. That is nonsense, too. On the right side of the 'var a = ' part the type is clea

    • I do a bit of programming teaching and I can sympathize with your problem of what language to choose.

      One thing that helps is having a language with a decent REPL. Python has this, and I've had some success getting people going in Python. I miss the days of LOGO where you could get 6 year olds to get the cursor to draw around the screen. JavaScript was something I considered, but I'm reluctant because of how many oddities there are in the language, e.g. let vs var, for(var x in y) vs for(var x of y), == vs

    • The long term question will be: what language do we teach in our programming courses?

      If you're teaching programming, use a language like Scheme. You can teach the entire syntax in 5 minutes or less. Then you can get to actually teaching programming.

      A university is not a vocational school. It's not your job to teach what's popular.

    • by urusan ( 1755332 )

      What to teach depends on your end goal.

      If you want to teach a practical language that your grads can immediately use in practice, and want it to also work with Java: teach Kotlin. The (Android) mobile space has gone this way, and Kotlin works (more or less) seamlessly with Java, so it's becoming more and more popular in the enterprise as well. I think it will eventually supplant Java as the most popular JVM language, beating out competitors like the more academic Scala.

      If you want to teach a practical langu

    • Project Jigsaw, was it really necessary? Maybe, but I'm not entirely convinced.

      It was not necessary, and your prior two comments were exactly correct.

    • When your language is no longer being taught in schools, well, that's the beginning of the end.

      Define no longer being taught. Everything you said was right so far as Java is no longer a suitable option for Introduction to Object Oriented Programming. That doesn't mean it's no longer being taught, it means it's not longer being taught to first year students.

      I just checked my old university. I learnt Java (involuntarily, I'm not a software engineer) in CS1001 which is a first year first semester subject in any computer related degree and an elective in other degrees. That course has moved to CO2001 (se

  • My personal view is asking the world to change their ways because you are too lazy to provide a proper mechanism for managing change is unacceptable.

    The argument often peddled is of the unfalsifiable objective evidence challenged variety which asserts progress / improvement necessitates breakage or some sob story about how dealing with old crap slows down development or requires too many resources.

    I don't share this view. Managing complexity is what programming is all about. Having a long term robust work

    • Comment removed based on user account deletion
      • Sure, programming is all about managing complexity, and it's possible to scale up to systems which can deal with extremely complex requirements of legacy customers and very old APIs and hardware and all that. But all of those considerations come with costs attached. Costs in time, money, resources of all kinds.

        This is an unfalsifiable concept. Everything costs something. I hear these arguments all the time. They don't communicate any objectively useful information.

        So where are these resources going to come from and how shall they be justified?

        It provides value to users.

        It is easy for customers, or users, or devs to sit back and demand a quality product that meets all our needs, that's delivered on time, that's well-supported, and doesn't cost US an arm and a leg, but those are all held in tension, and in the Real World, you simply can't have all four at the same time, so prepare to make some trade-offs and compromises.

        Demanding isn't the issue. Delivering is. If you can't someone else will. As technology matures and dependencies skyrocket the appetite for customers tolerating change without commensurate provision of value will continue to trend down. Find a way to deal with it or someone else will.

  • "The reason is that Java is 20-something years old. It will probably be big and popular in another 20 years. We have to think 20 years ahead." No other technology works that way - unless you have a monopoly or licensing lock-in.
    • by sjames ( 1099 )

      It's probably worth Oracle considering that it's 20 years old because up until Oracle, it was somewhat open and didn't try to make you rewrite everything to please the new version.

      But since they're Oracle, they'll blame someone else when the new version tanks.

  • The real problem... (Score:4, Interesting)

    by ilsaloving ( 1534307 ) on Thursday March 07, 2019 @03:32PM (#58233312)

    The real problem, and this is a problem that many newly created languages and systems have decided to happily and neglegently copy, is the fact that Java was the first language to merge it's grammar and it's libraries under a single banner.

    It was an idiotic idea then, and it's an idiotic idea now. Because of this one core terrible decision, backwards compatibility is now a nightmare for literally anything that follows this ridiculous paradigm.

    With C/C++, there is the core language. Because of that modularity, each can be updated independently of the other unless the core language introduces a breaking change. Which it generally doesn't, because the people overseeing C still have the ethics required to put their target audience first before their own personal convenience.

  • Rather than break the .Net Framework, they created .Net Core (which is cross platform). Both are being extended separately and in different functional directions (with a growing shared functionality referred to as .NetStandard).

    Here's a nice summary of this situation:
    https://stackify.com/net-core-... [stackify.com]

    Further, Visual Studio Code and Community aren't Eclipse...

  • They should have named it "Java 10", to signify a greater jump, and to avoid breaking changes with all of code out in the wild that looks for "Java 98" to indicate the old version.
  • by rsmith-mac ( 639075 ) on Thursday March 07, 2019 @04:06PM (#58233498)

    I'm not surprised that Java 9 and later is seeing limited traction, especially since you still have to jump through hoops to download the JRE for Java 9 or later.

    If you actually go to Oracle's Java.com runtime download site [java.com], they suggest the latest version of Java 8.

  • by Fencepost ( 107992 ) on Thursday March 07, 2019 @05:25PM (#58234076) Journal
    I can't help but feel that Oracle has gone out of its way to make the whole end of life for Java 8 and changes in licensing going forward as complex and confusing as possible, and given that it's Oracle I have to feel like it's intentional - probably in hopes of being able to extract usage fees from any commercial users who keep installing updates.
  • by reiscw ( 2427662 ) on Thursday March 07, 2019 @05:31PM (#58234114)

    I've had a lot of issues with the post-8 versions of the Oracle JDK. I'm a high school teacher and a graduate student in computer science. In classes at my university, we've been using it a lot because databases are my area of focus. Last semester we were pretty much working with relational databases, and we used Java to write web applications using Spring. This semester we are working with NoSQL databases. I spent a couple of hours last week trying to get HBase working with JDK 11, and found quickly that the message in a lot of forums is "don't bother trying, you're doomed." Since I don't really want two installations of the JDK on my machine, I reverted back to JDK 8.

    At school, our gradebook application is actually written in Java. You could run it from a terminal or command prompt (I use Linux, Mac, and Windows at school) with a "javaws launchGradeBook.jnlp" command (and it really ran the same in all three environments). In Java 11, javaws isn't around anymore, so that doesn't work. There's a workaround for our gradebook, but it's still annoying because I do a lot of my grading of student work from the command line. In Linux this isn't a huge deal because OpenJDK also supplies javaws, but in Windows/Mac it's a pain.

    The biggest annoyance, though, is that the java-package package (which supplies the make-jpkg command) in Debian (and Debian derivatives) still doesn't apparently work on post-8 versions. Don't get me wrong, I use OpenJDK too, but I've had some issues with it and I like to have the Oracle JDK around as a deb file I can install.

  • the language and platform is evolving faster than ever

    The point is that it would be nice if the language and platform could actually run faster.

  • Think about why Java's "still around" for a minute. It probably serves a purpose or two. IMHO Java's purposes are pretty banal but valid nevertheless.

    Java's main purpose lies in openness. As in you can't get strong armed by one player. The second purpose is in Java's type safety. Application programmers won't screw up badly. And so, you can setup an organization with a handful of programmers that actually know what they do and a huge load of application programmers with families, mortgages and lives.

    Ja

  • Could have fooled me. I just now went to Java.com, and what did I find? 1.8.202.

    Did they expect developers to update to 9 without end users having a version 9 JRE?

/earth: file system full.

Working...