• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Java 17 now available

 
Marshal
Posts: 22409
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The API changes can be found easily again. This time my own site comes last, as I found two alternatives that have a nicer UI:
  • https://docs.oracle.com/en/java/javase/17/docs/api/new-list.html. Yes, Oracle has its own "what's new" section!
  • https://javaalmanac.io/jdk/17/apidiff/11/
  • https://robtimus.github.io/whats-new-in-java/
  •  
    Rob Spoor
    Marshal
    Posts: 22409
    121
    Eclipse IDE Spring VI Editor Chrome Java Windows
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    My favorite new feature is unfortunately still in preview: pattern matching for switch. The class variant is somewhat nice already:

    However, my favorite is allowing null to be used in case labels:

    One limitation - for enums null must come first, because it starts checking the ordinal() as soon as a constant is encountered. For strings it can come anywhere.
     
    Rob Spoor
    Marshal
    Posts: 22409
    121
    Eclipse IDE Spring VI Editor Chrome Java Windows
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    And before I forget, a warning: JEP-403 has made it impossible to use --illegal-access. Java 9 introduced the flag with default value warn; Java 16 changed the default to deny, and now Java 17 ignores it. In some future version it will be dropped completely.
     
    Bartender
    Posts: 1064
    33
    Eclipse IDE Postgres Database C++ Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Absolutely Zero Intention of asking anything Contentious, but what meaningful reason if any would one have for choosing either that link or:
    https://jdk.java.net/17/

    Over the other one?

    I feel like there may be a subtle licensing terms difference, but I am not sure what it is, or how it might ever possibly be enforced, so just asking.
     
    Saloon Keeper
    Posts: 13202
    286
    • Likes 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    The Oracle JDK 17 uses the new Oracle No Fee Terms and Conditions license (NFTC).

    The OpenJDK 17 still uses the GNU General Public License version 2, with Classpath Exception (GPLv2+CPE).

    I haven't read through the NFTC yet, but it appears that you can use the Oracle JDK 17 for free for commercial purposes until a year after the next LTS version is released. After that, you basically have to pay big bucks to keep using it. Also, I believe the Oracle JDK contains some proprietary tools and libraries that are not open source.

    If you're planning on using Java in a high availability production environment, and you also intend to update Java as soon as the next LTS version is released, I suppose it makes sense to use the Oracle JDK version.

    If you're only using Java for personal projects, or if you plan to keep using Java 17 after its end-of-life and don't want to pay Oracle a lot of money, just keep using OpenJDK.

    Jesse Silverman wrote:or how it might ever possibly be enforced


    They can sue the crap out of you.
     
    Jesse Silverman
    Bartender
    Posts: 1064
    33
    Eclipse IDE Postgres Database C++ Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks!  I went with the OpenJDK version.  I'm not an over-the-top FLOSS-fanatic, but I heard good stuff about the OpenJDK version, i.e. the library stuff you lose almost nobody uses.
     
    Rob Spoor
    Marshal
    Posts: 22409
    121
    Eclipse IDE Spring VI Editor Chrome Java Windows
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I'll wait for Adoptium to release their version. That shouldn't take more than a few days.
     
    This looks like a job for .... legal tender! It says so right in this tiny ad:
    the value of filler advertising in 2021
    https://coderanch.com/t/730886/filler-advertising
    reply
      Bookmark Topic Watch Topic
    • New Topic