Announcement

Collapse
No announcement yet.

JDK 21 Forked From Mainline For What Will Be The Next Java LTS Release

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Is Java 21 more like the old .NET Framework (i.e like .NET Framework 4.8) or the new .NET (i.e. like NET 7)?

    In the old .NET Framework you can get conflicts when your solution has projects which depend on different versions of the same dependency, and it gets rather messy and you get run-time errors which you sometimes can solve with declaring binding redirects in the config file. In the .NET this is all gone and everything works much better.

    Comment


    • #22
      Originally posted by timofonic View Post

      I understand your reasons. Despite it isn't, I did read it as astroturfing. Anyway, users like me despise using Java programs for some reason.
      There most be some motivation for your dislike.

      A lot depends on what other computer languages you're familiar with, and whether or not you've had experience in project teams working on a suite of programs for 6 months or more. I have with both COBOL and Java. I'd programmed in over 20 computer languages before I came across Java.

      One of the attractions of Java was program written on one O/S could run on another without further modification. Can the same be said for your favourite computer language(s)?

      If you prefer brevity in programming languages, you might want to program in APL!

      Comment


      • #23
        Originally posted by rclark View Post
        Wonder how much Java is actually used anymore. I know we abandoned it when Applets were no longer accepted by our customers security IT departments.... I really liked that idea of applets at the time as I saw the potential there. My current company uses C#, VB, C++, JavaScript for most of their work. In my department we use lots of Python, C, C++. There are a couple of our vendors products that use Java Helper apps. That's about it.
        I've never written Java applets professionally, though I once wrote one as an exercise.

        Java is for serious programming, or for non-trivial fun programs. It is not for people that think a thousand lines of code constitutes a large program, nor for people who think that having multiple compile units is 'complicated'!

        Comment


        • #24
          Originally posted by aorth View Post
          I am hoping that the efforts to integrate native Wayland support go somewhere eventually. So many desktop Java applications have a terrible user experience on Wayland. I built project Wakefield from source a few weeks ago an unfortunately it didn't help any of my broken applications.

          https://wiki.openjdk.org/display/wakefield
          Are you using Swing, the 'new fangled' JavaFX, or some other Java GUI system?

          I started with Java GUI stuff before Swing. I quite like Swing and love the GridBagLayout (which is well worth mastering). Though, if you are getting into Java now, then probably JavaFX is the way to go.

          Comment


          • #25
            Originally posted by uid313 View Post
            Is Java 21 more like the old .NET Framework (i.e like .NET Framework 4.8) or the new .NET (i.e. like NET 7)?

            In the old .NET Framework you can get conflicts when your solution has projects which depend on different versions of the same dependency, and it gets rather messy and you get run-time errors which you sometimes can solve with declaring binding redirects in the config file. In the .NET this is all gone and everything works much better.
            Java compiles to byte code and each new iteration of the JDK is designed to be able to read the older byte code. So you could be developing a brand new application using the OpenJDK 21 and pull in a dependency written 20 years ago written against Sun Microsystems JDK at version 1.4 and it works. As a result it doesn't matter if you Application is compiled to 1.8, Sprint to 1.7, measurements library to 1.5, etc.. it all just works.

            You can't go the other way, for example Spring Boot v2 was built against Java 1.7 so a lot of applications compiled against Java 1.8. Trying to upgrade to Spring Boot v3 you find it is now compiled against Java 17. Your application can't use the dependency (you get a compilation error), changing the compiler to 17 is needed.

            The Public API always remains compatible, but within JDK's there are often inner classes used to setup various public API's. Sun/oracle never promised to keep those hidden inner classes consistent. As a result its always been bad practice to reference those classes and honestly I have never actually found a reason where you would need to (normally people are too lazy to find a library so build a big complex thing on top of the inner classes), but every compliant about JVM compatibility is normally based on an application using those inner classes.

            The recent sprinting through numbers has pulled a number of libraries out of the core JDK itself, so 1.8 code doesn't necessarily just work when compiled on Java 11, similarly jumping to 17 has the same issue. The extracted code is placed into its own project and can be pulled down as a dependency. Its annoying

            Comment


            • #26
              Originally posted by szymon_g View Post

              tracker3 and baloo can do it ootb
              docfetcher is different, you get the ability to scroll through the search hits and see them in the context of the text around them. It's similar to the Windows program File Locator Pro in that way.

              Comment


              • #27
                Originally posted by caligula View Post
                Most enterprise users are still stuck with JDK 6, 7, or 8.
                Can you back this with some data? I am pretty sure there are companies and projects relying on Java 6 or 7. But that's insane. I know large companies have Java 8, but this is scares. Most moved on to Java 11 and Java 17, using Spring, Spring Boost or stuff from public clouds.

                Comment


                • #28
                  Originally posted by uid313 View Post
                  Is Java 21 more like the old .NET Framework (i.e like .NET Framework 4.8) or the new .NET (i.e. like NET 7)?

                  In the old .NET Framework you can get conflicts when your solution has projects which depend on different versions of the same dependency, and it gets rather messy and you get run-time errors which you sometimes can solve with declaring binding redirects in the config file. In the .NET this is all gone and everything works much better.
                  Depends...

                  It is definitly not as big migration as Net framework to net core.

                  And depends if you ask about runtime or development kit. In case of runtime Java is fairly strong forwards compatible, eg. project written in older java will succesfully run in newer runtime. I remember running for example Ghidra and few other tools in forward java version with no issues.

                  If you ask about development kit, I heard migration from Java 8 to 11 was very brutal for most. Dependencies breaking, language changes etc. Java 11 to 17 is smaller jump... but in general if you have dependency without updated version for newer version of Java (and dependency didn't break anything) that can be problem.
                  Last edited by piotrj3; 09 June 2023, 10:39 AM.

                  Comment


                  • #29
                    Originally posted by mathletic View Post

                    Can you back this with some data? I am pretty sure there are companies and projects relying on Java 6 or 7. But that's insane.
                    This report presents the results of the largest annual survey on the state of the JVM ecosystem.


                    At least in 2021 they were still using 6, 7, and 8.

                    Comment


                    • #30
                      Originally posted by rogerx View Post

                      If I'm not mistaken, the cell/mobile phone market, as well as most portable electronic devices have either bought into or sold their souls to Java. They're likely expensive, partly due to the likely software licensing.

                      Never was a fan of Java (programming language), except for real coffee. As a result, I only buy a small amount of needed portable electronic devices.
                      That's the first time I heard someone say they're limiting their electronic device purchases because of a programming language.

                      Comment

                      Working...
                      X