Using Java 11 In Production: Important Things To Know

If you stay up to date on news from the Java community, you may have heard that Oracle have changed their support model for Java.  Some news is even suggesting that we now have to pay to use Java – this is not true!

This topic is quite a complex one since there are a number of overlapping changes that have come together since the release of Java 8. The new six-monthly release cadence and Oracle’s changes in licensing and support model mean that any organization that deploys a Java application should take this opportunity to look at:

  • Where they get their JDK from (e.g. Azul, IBM, Oracle, Red Hat, or other OpenJDK build)
  • Which versions of Java they use in production
  • Whether or not they expect to get updates (e.g. patches and security fixes) for these versions of Java
  • Which versions they want to use in the future
  • How frequently they want to update their version of Java (i.e. to the next major version)
  • What sort of support (i.e. triage and bug reports) they expect for their version
oracle-license-change

This warning is on the download page for Oracle’s commercial JDK – don’t ignore it!

Changes to the Oracle JDK

In the past, many of us simply downloaded Oracle’s JDK and used this in development, in testing, and in production.  From Java 11, Oracle has changed the license of their JDK, so instead of having a single JDK build which can be used either commercially (i.e. with paid support) or for free (which many of us were doing), they now have two different JDK builds:

  • Oracle’s JDK (commercial) – you can use this in development and testing for free, but if you use it in production you have to pay for it
  • Oracle’s OpenJDK (open source) – you can use this for free in any environment, like any open source library

Note that since Java 11, Oracle’s commercial JDK and Oracle’s OpenJDK builds are functionally the same, so we should be able to run our applications on either without having to make any changes or losing any features.

Support and Updates

There’s an important difference between these two builds though – if you’re using Oracle’s commercial JDK, you’ll get updates and support.  If you’re using Oracle’s OpenJDK build, Oracle won’t be providing updates to past versions. What this means is now Java 11 is out Oracle will no longer be updating their OpenJDK builds for 10 or 9. So, if you’re using Oracle’s OpenJDK build, you should be prepared to update to each new version of Java as it comes out (or run an older version that won’t get updates).

Having said that, Oracle is not the only vendor in this game.  For years, we’ve been used to using their JDK for free and so it has generally been our default, but there are other vendors who provide JDKs, and they have different support models (free and paid for), and different attitudes towards providing updates for different versions of Java.  Some of these other vendors, for example, may continue to provide updates and/or support for Java 9 (which Oracle will not).

Stephen Colebourne has written a post summarizing the different JDK builds from the different vendors, and explaining how (and why) all these vendors provide different builds based off the same code (i.e. OpenJDK).

If you don’t want to use either of the Oracle JDK builds (for example if their support or updates policies doesn’t suit you), investigate what Azul, IBM, Red Hat, and the community-led AdoptOpenJDK have to offer instead.

Conclusion

This summary is something I wrote in September’s Annotated Monthly, updated to reflect the release of Java 11:

  • You can still download the commerical Oracle JDK for free and use it for free in development/test environments.
  • Oracle’s JDK 8 will no longer receive public updates after January 2019. If you want to receive updates to Java 8, you may need to pay Oracle or to find another JDK build.
  • As of Java 11, OpenJDK has feature parity with Oracle’s JDK, so if you want to use a free JDK, use OpenJDK. You can download Oracle’s OpenJDK 11 build, or builds from the community led AdoptOpenJDK.
  • The ongoing support and updates for “older” versions of Java (including 9 & 10) has changed since the introduction of the six-monthly release cycle.
    • For Oracle’s commercially-licensed JDK, Java 9 and Java 10 are no longer updated or supported.  If you’re currently using Oracle’s JDK, you need to look at which version(s) you’re using and which versions you want to use going forward, and you need to understand Oracle’s support model (and prices) if you want to use it in production.
    • If using OpenJDK, you may need to upgrade to the latest version as soon as it’s available, depending upon which vendor’s build you’re using. This advice applies to pretty much any free open source library or framework.
    • Other vendors may offer support for Java 9 or other versions.
  • If you want full support or updates for the version of Java you’re running in production, you should compare and contrast the support models and prices of Azul, IBM, Oracle and Red Hat. Note that these companies always had free and paid for services and support, so none of this is really new.

Further Information

This entry was posted in News & Events and tagged , , . Bookmark the permalink.

66 Responses to Using Java 11 In Production: Important Things To Know

  1. Pingback: Java SE 11: The Great Removal – Kynosarges Weblog

  2. Łukasz Matuszewski says:

    Main question is: can i use jlinked binary of my app (with all jre based modules from Oracle JDK) and sell it as my product?

    • Trisha Gee says:

      I don’t know the answer to that question. Anyone wanting to distribute Java should check the license of the JDK they’re using before doing that.

    • Franz says:

      The PGL license of the OpenJDK has a special “Classpath exception” that allows you to link your program with the OpenJDK and ship the whole executable under your own license (without the need to make your program open source).

      https://stackoverflow.com/questions/4143635/do-i-need-to-open-my-source-code-if-i-use-openjdk-as-jvm
      http://openjdk.java.net/legal/gplv2+ce.html

      I´m not 100% sure if this is also true for single modules of the OpenJDK. But as far as I understand the exception, it is ok as long as the modules were not modified. However, I suggest that you take a deeper look in that by yourself.

    • Elhanan Maayan says:

      i’m not entirely sure this is the case, i recall reading somewhere that only java files are CPE while the HOTSPOT is bare GPL ,which cause a problem .

    • Dan fuela says:

      Yes you can: “Oracle grants You a nonexclusive, nontransferable, limited license to internally use the Programs, subject to the restrictions stated in this Agreement and Program Documentation, only for the purpose of developing, testing, prototyping and demonstrating Your Application and not for any other purpose. You may allow Your Contractor(s) to use the Programs, provided they are acting on Your behalf to exercise license rights granted in this Agreement and further provided that You are responsible for their compliance with this Agreement in such use. You will have a written agreement with Your Contractor(s) that strictly limits their right to use the Programs and that otherwise protects Oracle’s intellectual property rights to the same extent as this Agreement. You may make copies of the Programs to the extent reasonably necessary to exercise the license rights granted in this Agreement. ”

      In plain English, a java developer CAN sell the Java code to a contractor without provided bundled jre. if he/she informs the contractor that in order to use the developer’s java code the contractor will have to pay Oracle too for using jre in their business (Java code is useless without Jdk or Jre)!

  3. Varuna says:

    The latest post from Stephen Colebourne’s blog is Do not fall into Oracle’s Java 11 trap, which is posted at https://blog.joda.org/2018/09/do-not-fall-into-oracles-java-11-trap.html?m=1. What is your comment about this last post from Stephen

    • Trisha Gee says:

      The reason I wrote this post is pretty much the same reason Stephen wrote his – to make people aware that we should no longer be downloading the Oracle (commercial) JDK build as the license states that you have to pay to use it in production. So, from that point of view I believe Stephen and I are in agreement.

      I do think, however, that Oracle has made a bigger effort than one would expect from such a big (and money-incentivized) company to make people aware of these changes and to help people to not fall into the “trap”. They’ve been active on Twitter and mailing lists publicizing the changes, they’ve posted numerous blog posts trying to clarify the situation, and they were actively involved in the “Java is still free” document from the Java Champions. They’ve also posted a big notice on the download page of the commercial JDK warning those about to download it that the license has significantly changed, and providing a link to the open source version as well. Granted, the download page doesn’t specifically state “if you want to use it for free in production don’t download this”, but Oracle has gone out of their way to help developers understand the situation.

      • Trisha Gee says:

        In fact I’ve just updated this blog post to include the warning from Oracle’s download page, to not only show it exists but to help people understand that this article is explaining some of what that warning means.

  4. Franz says:

    Thanks for that great post. It makes a lot things more clear to me.
    But I still wonder how it works for the JRE. You wrote, the JDK is free for development and testing, but not for production. Actually, you would use the JDK for development and the JRE for production.
    How does it work here? Is there also an open JRE? Or is OpenJDK meant to be used as productive JRE as well?

    • Trisha Gee says:

      I actually don’t know the answer to that. I know there’s no free JRE from Oracle, and last I heard you could build an OpenJDK JRE but they weren’t distributed, but I’m not sure if that’s the case any more. I will find out and post on the blog when I know more.

    • JTW says:

      There is no separate JRE any longer. So there is no JRE you can download from Oracle or anywhere that doesn’t make their own non-compatible distributions, only a JDK (which, to be fair, is about the same size that just the JRE used to be).

      Your ONLY option if you don’t want to pay someone big money for a support contract is Oracle’s OpenJDK, which comes with no support whatsoever and only 6 months of even security updates.
      AND it ties you to the GPL which may have disastrous results for your code ownership.
      While the CE is there I’m not so sure it covers all scenarios when running against it, rather than just compiling against it as it only covers the old standard class library.

    • Dan Fulea says:

      JDK is just JRE plus extra features. What matters is JRE which is no longer free. What you write is your business and you can do whatever you want with it. The catch is that the person who you sell your crap, in order to use it, must have at least JRE installed in his system and if he want to use JRE for business, he must pay ORACLE. That’s it.

  5. Elhanan Maayan says:

    “Java is still free” document is a joke in my opinion, giving us a document stored somewhere on a google drive(!) which was written by a bunch of people that most of them don’t work for oracle, claiming that it’s still free ,is something that nobody can really use.

    Our lawyers don’t even permits us to use openJDK with it’s CPE licence, so unless this document isn’t promptly presented in both oracle’s and openJDK site, as a proper webpage i’m not sure how it’s use to anyone..

    • Jeff says:

      The OpenJDK 11 download page on java.net states: “This page provides production-ready open-source builds of the Java Development Kit, version 11, an implementation of the Java SE 11 Platform under the GNU General Public License, version 2, with the Classpath Exception.”, and links directly to the full license text, also stored on java.net. I’m not a lawyer but to me that seems like a fairly clear and straightforward statement of the OpenJDK’s freeness. I imagine the license text is also contained within the download archives themselves.

      • Elhanan Maayan says:

        there’s only one tiny tiny difference, and that’s the word documents says it’s “free for commercial use” the offical page does not.
        our own lawyers do not allow us to use anything that has a CPE in it, and that includes any jar with official java api, so if i wanted to use websockets api in java se, i had to resort to netty’s implementation.

        • ikk says:

          What’s the problem with CPE (ClassPath Exception)? Isn’t it supposed to give **more** freedom than standard GPL?

          • Elhanan Maayan says:

            “supposed” is a good word, especially for lawyers.
            CPE was originally conjured to overcome the original limitation of GPL that was based on the concept of linking and compiling in c, YOUR source along withe GPL’ed source, thus making your work considered to be “derived” or base on the source, forcing you to distribute your own source code with the gpl’ed one.

            the CPE was designed to exclude languages the do the run-time linking (i.e java) thus still making your code separate from the gpl code.
            but you still have a problem of interpretation of what’s derived or based on.

  6. Jeff says:

    I am the solo developer of a niche desktop Swing application with a fairly non-technical user base. For me the most serious concern about these developments is that they seem to signal the death of “compile once, deploy everywhere”. At present, I can build a jar on my Linux development machine and distribute it to my users, mostly on Windows and Mac machines. Even my most non-technical users can manage to download a JRE from java.com and install it with the graphical installer, but the majority of them would not be capable of downloading a zipped OpenJDK build and installing it correctly.

    What I’m supposed to do from now on is to use jlink et al. to produce a binary for each platform with the necessary JDK bits bundled. Except that those packaging tools don’t support cross-compilation, so now I need to maintain three build environments instead of one. I also need to buy a Windows license, and I need to buy an entire Apple computer because the license for OS X forbids running it on anything but Apple hardware.

    I realize that my use case is probably not a common one, but for me personally it’s a worrying development. For now, I’m planning to stick with Java 8 until the end of public Oracle support for the JRE ends (recently extended to 2020), then evaluate my options. Perhaps by then there will be a third party offering user-friendly OpenJDK installers, or even a cross-compiling build tool for Java…

    • Elhanan Maayan says:

      you may have a bigger problem as i’ve heard that swing in openJDK doesn’t work as well, personally i think this will signify the end of java, but no one believes me.

      not sure i follow, why would it be complicated to unzip something? the jre should work as it is, it may not have a path, but it should work…

      you bigger problem is users downloading the RIGHT version, for you app..

    • Trisha Gee says:

      You’re not the only one I’ve heard from in this situation, and the new changes make it very challenging for people like you. I believe that the health of the Java community depends upon making things as easy as possible for you, and I believe that a solution will be available. I’m keeping an eye on the situation myself and will share solutions on this blog as and when they become available.

      • Andrew says:

        I’m also a “compile once, deploy anywhere” application author, in my case a hybrid Swing/JavaFX application. Java 11 has required a lot of work to try to keep the application running reliably across platforms, but thankfully Oracle is still defaulting to Java 8 on java.com so it hasn’t been as problematic as it could have been.

        At this point I’ve wound up with a bundled-Java8-JRE option for Windows, a cheap used Mac Mini plus a Maven build that bundles the JavaFX libraries to work on macOS with Java 11, and “stick with Java 8” for Linux. But it’s still a lot more work to release an update than the run-anywhere Java 8 build is, and for a side project the overhead becomes significant.

        I’m also worried when I read articles such as https://jaxenter.com/java-influencers-series-part-2-148371.html where some Java leaders are suggesting removing Swing. That would entirely kill the “compile once, run anywhere” aspect for desktop applications that was a large part of why I chose to build in Java in the first place. Definitely interested in any future blog posts with recommended solutions.

    • Elhanan Maayan says:

      i just heard Amazon released an LTS of openJDK 8 , it’s an MSI , so you could try and check it out…
      https://aws.amazon.com/blogs/opensource/amazon-corretto-no-cost-distribution-openjdk-long-term-support/

    • Franz says:

      I´m in the same situation as you. I also need to think about how to deal with the whole situation.
      Regarding the multi-platform support, I found out, that you can bundle your application with jlink for several platforms without the need to compile it on the corresponding platform.

      See this post:
      https://stackoverflow.com/questions/47593409/create-java-runtime-image-on-one-platform-for-another-using-jlink/
      I haven´t tried it for myself yet. But it sounds promising. I hope this helps.

    • Use docker mate. That’s, sealed in stone, write once run anywhere.

  7. David says:

    If using the Open Source GPLv2+CE license Oracle Open JDK build for Java 11 is it true that you’d need a licence if you want support beyond 6 months?

    The story I heard was that you can use Oracle Open JDK for “free” commercially from here: https://jdk.java.net/. However, when it comes to the new cadence of 6 month releases I was told that if you want support past the 6 months you’d need to pay (so LTS indicates it’ll get support/patches, but as soon as 12 is available those on 11 would need to upgrade to 12 unless they have a paid commercial license for 11).

    Is this true?

    • Trisha Gee says:

      Oracle don’t provide “support” for the Oracle OpenJDK build, but they never provided support for non-paying users of the Oracle JDK either. What they did provide was updates & security patches up until some end-of-life point. From Java 9 onwards this end of life for Oracle’s OpenJDK builds 6 months, as you’ve mentioned.

      If what you mean by “support” is updates and patches, then yes, what you say is true: either use Oracle’s OpenJDK build and update every 6 months, or get a commercial license for 11.

      Alternatively:
      – stick with Oracle’s OpenJDK 11 indefinitely, knowing that there won’t be any updates / patches after 12 comes out
      – use an OpenJDK build from https://adoptopenjdk.net/. Adopt OpenJDK aims to provide updates for the LTS release (in this case, Java 11) for at least three years. So you don’t need to upgrade to 12 when it comes out
      – choose another vendor. Azul, IBM and Red Hat also have free versions of Java and different support/updates models.

      • Elhanan Maayan says:

        IBM doesn’t really provide a JVM, unless you purchase one of their products, their distributions is even murkier then oracle’s

        • Trisha Gee says:

          IBM have downloadable JDKs which “provided you adhere to those license terms you can use it in a personal or enterprise setting.”. Granted, I haven’t checked the terms of their license specifically. But it’s also worth noting IBM in the context of this post anyway since many people are using the IBM JVM in IBM Application Servers etc.

          However your comment talks specifically about a JVM, and IBM actually do provide a free JVM, called Open J9, which they contributed to the Eclipse Foundation. You can download JDKs with the J9 JVM from AdoptOpenJDK.

          • Elhanan Maayan says:

            the IBM licensce agreement talks that you can only use the JDK in what’s specified in the “invoice”. which complicates matters, plus there’s no windows distro.

            openJ9 is VM implementation, it does not include the compiled binaries, and cannot be considered as a comparable replacement like zulu JDK, or adoptOpenJDK which we cannot use because they a CPE license.

  8. Pingback: Best of Tech #1 - Atol Open Blog

  9. Pingback: Últimas novedades de JDK 11 y Netbeans | Blog personal

  10. Chris B says:

    This is why the software field needs to have a standardized programming language which isn’t owned or controlled by a corporation. The same thing happens every time. The language starts out free and then eventually becomes a pay-based language with all sorts of restrictions on use (particularly commercial use).

    The new Oracle licence makes it very clear that you can no longer use Java for commercial use without paying. Given the recent lawsuit between Oracle and Google, Google is going to be motivated to pull all Java from their code base and drop support for it altogether. You will never see Java on a Google Android device ever again. Other companies will do the same. The motivation now is to get rid of Java as quickly as possible, before Oracle comes looking for your company too.

    Oracle is going to kill Java.

  11. steven hepple says:

    Do you know what….just blumin use python instead. This nonsense is ripping the very soul out of java. With a multitude of jdk`s from other sources available…all it needs is one slight difference…and wham, your software(and your customers) is down and out.

  12. ayush nigam says:

    can i still use java 11 for making apps using android studio bcz java 11 is paid now??plz answer

    • Trisha Gee says:

      Android never used the Oracle JDK (which is why Oracle sued Google in the first place) so should not be affected by Oracle’s JDK moving to a paid support model.

  13. m.k says:

    The thing is – that based on the article above – you could conclude that Oracle JDK and Open JDK are functional same – and that updates and support what is all about. Unfortunately that is not the case.

    Oracle JDK have better performance then Open JDK – and if you used Oracle JDK for a long time within your company – and you are planing to switch to Open JDK, you will experience some “slowness” for sure.

    https://superuser.com/questions/1365208/are-there-performance-differences-between-openjdk-and-oracle

    Quote: “As Oracle is responsible for creating both, it’s clear that it will ensure that its clients will have good reasons for paying, and performance is the obvious means.

    I believe that OpenJDK is interpreter-only JVM. This is easier to port as it has no architecture specific assembly code but, unfortunately, it’s less performant.

    OracleJDK I think takes advantage of the platform’s floating point ABI (Soft Float on RP1 and Hard Float on RP2). It might also have some amount of platform-specific code to make it faster.”

  14. David says:

    @M.k. I’m not sure that this is the case. At least when listening to speakers at London Java Community (LJC) events, they seem to imply quite often that the source code is precisely the same, that the two projects now build from the same source code. If that is the case, then I don’t think there is any functional or performance difference in either.

  15. Meh says:

    So long story short nothing has “actually” changed. Oracle simply modified their commercialware to comply to truly commercial benefits to Oracle. That and the rediculous six month update cycle.

    Aside from paying Microsoft for use of Visual Studio the end user doesn’t actually rent the lingua definition that sets the programming presidence, so if I get this right Oracle are not charging for their tools their instead charging enterprises for using their language?

    • Trisha Gee says:

      Oracle are charging Enterprises for support and ongoing updates to a programming language. This is not that different from what they used to do, other than the length of time they offer updates for free.

  16. sugumar says:

    Queries
    We are a vendor for multiple organisation and are planning to use Java 11 for our upcoming projects.
    We need to know the licensing pricing details of Java 11 and the various options that you are availing for your customers.
    What sort of oracle licensing would you suggest if we need to use Java 11 for development purposes and its cost
    For an individual developer
    a group of 10 developers
    a group of 50+ developers
    What kind of licensing should we opt for in case we are building an application that would be sold to multiple clients. We will need to host these application in client environments.
    Please let us know our options
    Please also do let us know what sort of support you can offer with each type of licensing you are offering.

    • Trisha Gee says:

      We (JetBrains) are not selling licenses or support for Java, so this is not the correct forum for this question. To answer these questions you will need a specialist, someone who understands software licenses and support contracts, and you’ll need to contact the vendor or vendors you may wish to purchase from (Oracle, IBM, Azul etc).

  17. Noam says:

    Hi,
    My company has an application both for OSX and Windows written in JavaFX with java 8.
    If we decide not to update our java version anymore (and start writing native apps until we can transition to them) do we still need to pay? We have more than 100k users which is crazy.

    Thanks

    • Trisha Gee says:

      The license for Java 8 has not changed so you don’t need to pay for this. (note: never take legal advice from a developer advocate! If in doubt ask a lawyer!)

      Note that JavaFX is now not part of the JDK any more, it was split out in Java 11. So you have a different migration path anyway.

      • Noam says:

        So until we decide to upgrade to 11 or get newer java 8 versions with support its totally free?

        • HR says:

          yes but starting 2020 Java 8 will not get any updates anymore.. including security updates..

          “Oracle’s JDK 8 will no longer receive public updates after January 2019. If you want to receive updates to Java 8, you may need to pay Oracle or to find another JDK build.”

          so.. be aware… Government customers wont like that..

        • Trisha Gee says:

          Yes Java 8 is free (and note this is for all Java 8 builds, they all have the same license). Your sentence about newer versions of 8 with support doesn’t make sense as the change in support / licencing only affects Java 11 onwards.

          But you will not be getting updates / security patches any more for Java 8 as Oracle have started the end of life process for Java 8. So if you want updates you’re still going to have to look for a different vendor / build.

  18. HR says:

    Once again Oracle took something that worked, SUN, and destroyed it. This time with huge impact all over the world. I’m shocked that people just dont take this seriously enough.

    “nothing has changed”?.. OK.. that the dummeset sentence this decade. Obviously written by people not involved in the real world scenarios of huge customers who need their stuff to WORK, and will NOT pay the developers to change and test their applications all over again because of this.

    Never had issues with changes to licenses to Java before nor upgrading JDKs. Now I have.. big ones.

    Coding Java for 20 years it makes me sad to see Oracle turn Java into a piece of commercial junk like Microsoft.

    I begin to understand why my former company had a motto: “don’t EVER use anything from Oracle but their relational DB”, in fact you got fired for not adhering to this motto.. back then JDK was free.

    I think we need to adopt that motto in my current company.. I remember their own OracleJDK way back in 2000-2002 where there were HUGE bugs in their JDKs.. what a nightmare..

    And this comment “For years, we’ve been used to using their JDK for free and so it has generally been our default” …ehmm YES!!?.. that because that is how Java was meant to be, since SUN started !! That’s the promise Oracle made .. to continue this way.
    As always Oracle lie through their teeth if they can make money from it.

    Now we also have to find new ways of distributing and coding java.. and also hope that the different suppliers of OpenJDK’s dont mess things up.. “oh but we have testing/compliance procedures”.. sure.. that always prevented bugs in other software right..

    Good luck to all of us.. currently I am rewriting a 20 year old product to make it work with OpenJDK 11. First time in 20 years we have had to use large amounts of time for upgrading a JDK.

    I am not a happy camper.. to say the least..

    • Elhanan Maayan says:

      Why 11?
      Amazon has an lts for 8?

      • Elhanan Maayan says:

        I meant openJDK 8 will be supported for LTS by amazon

        https://jaxenter.com/amazon-corretto-8-generally-available-155086.html

        So you could start by adapting first to openjdk 8 and have time to 2023

        • HR says:

          we could.. but its a big piece of software, and we will have to change to the new module system sooner or later, so we decided to dot it now.

          Also we will not pay for support for the JDK, and as we have almost solely Gouvernement customers all over the world, we cannot sell software that has no security updates. In the US Gouvernement theu actually scan for security updates to the JDK, and we are ordered to update when an issue is found. So keeping 8 would only be possible until end 2019.

          • Elhanan Maayan says:

            we are facing the same issue here, (scanning and what not), that’s why i thought it was the end of java until corretto came out.

            the new module system is just one problem, the runtime classpath behavior as also changed. just moving openJDK itself may generate enough noise you wouldn’t know where the fault rests , either in 8 or 11 , or openJDK.

            you would also need to take into account the dependencies, and their transitive dependencies, that may not work with 11 (for example logj4j 1.2 doesn’t work with 9 due to a bug ,that will not be fixed)

            further more 11 has taken OUT some built-in libraries like jaxb,jaxp,corba, and some j2ee as they are in seperate jars.

            btw are you bundling your jre with your stuff?

            • HR says:

              I am currently trying NOT to build our own JDK.. I simply dont trust that I can keep the maintenance overhead down..

              But it will take me 1-2 months to do the conversion to OpenJDK 11 (we are currently in production with Jdk-1.8.0_166/201.. there are several components in our products).. so maybe we will HAVE to. I hope not.

              Already has major issues with java.xml and other XML based packages.. big sigh.. I actually decided to deprecate some of our features, to get rid of the hassel of maintaining the module stuff..

              I am absolutely no fan of the module thing.. might be fine for the odd developer.. but with software spanning 20+ years of development, its a nightmare.

              So I will attempt to not use cusotm modules, and keep a “clean” JDK. Its also a requirement from some customers that we do NOT pack our own jdk. If we decide to do so, we will introduce another complexity that will introduce more overhead (time AND money).. and the customer will not pay the bill.. my boss has to. Hes not liking the idea 😉

  19. Robert says:

    We are using he latest JAVA version:

    java version “1.8.0_201”
    Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
    Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

    I followed this installation instruction to install OpenJDK12:
    https://stackoverflow.com/questions/52511778/how-to-install-openjdk-11-on-windows

    But it is not working. The result I want to have is, the user is able to switch between the version 1.8 and OpenJDK.
    Do you have any installation instruction to follow and to have both versions in parallel running?

    • Trisha Gee says:

      Do you mean generally, or specifically in IntelliJ IDEA?

      • Robert says:

        Generally meant.

        I did now again a lot of tests. It seems OpenJDK can be installed, but you can only choose the Java version by changing the system variables.
        The option for the user to choose the Java version by himself is not possible (for me right now), even when you have inserted the OpenJDK to the Java Control Panel.
        If you de-install Java 1.8 and just install OpenJDK you don’t have a Control Panel available. The settings can still be modified in “C:\Windows\Sun\Java\Deployment”.

        Well, seems not to worked as my wish is.

        • Trisha Gee says:

          Personally I have found the Java Control Panel not very useful for controlling the version of Java on Windows. It’s much more reliable to add environment variables for the versions you have (for example I have %JAVA8_HOME% and %JAVA11_HOME%), set a default for JAVA_HOME and change that when necessary. It’s not ideal but it’s the best solution I’ve found for working with multiple / non-Oracle versions of Java

          • Robert says:

            Thats also a good idea!
            But well, the users do not have the access rights to change the system variables and even most doesn’t know which Java version they will need. Probably by try’n’error they will recognize, but otherwise they will open a ticket an complain why the software is not working.

            In the meantime, we had some discussions with some software vendors. One of our used software is ready to use the OpenJDK. BUT we needed to import a new registry key. As OpenJDK is not really an installation, we needed to add something like “HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\” and import there the “JavaHome” variable with the corresponding entry to the OpenJDK store location. It is independed if the “” is named 1.8 or 1.12 or whatever, just this “JavaHome” variable must be available and the program starts.
            As explanation by the software vendor it seems to be in the compilation of Java programs, that the registry entry is still needed – otherwise we need to go back to past and change the compilation possibilities of Java 😉

  20. Adalbert says:

    Does all of it means that i can’t bundle jre with my applications anymore to sell them together? I was working on a video game (i know using java for video games isn’t that popular but you can still find a few games written in java even on steam) with java 8 and libgdx. I was planning to sell it once i finish it, and to do this i wanted to bundle jre with the game (with launch4j). Can i still do it? How about using jre from openJDK 8 instead?

    • Elhanan Maayan says:

      you never could :)
      btw i didn’t know java actually was used with games, i was thinking on learning unity for doing a driving simulation (it uses csharp, but it’s also portable)

      • Adalbert says:

        Yes, there’s a few games made in java (i.e Halfway, Balrum). Those are small, 2D indie games. Anyway i’ve noticed those games come with jre bundled. And i was wondering about legality of that. How about using jre from openJDK instead of Oracle’s? Is this also illegal?

    • Trisha Gee says:

      You need to check the licensing on this, there were always strict rules on distributing Java. You might start by looking here: https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html

      However from Java 9 you can use JLink to package just the bits of Java you need for the app instead of a JRE (and it’s probably a smaller package this way). I believe this is the preferred way moving forward, but you need to do your homework on this.

Leave a Reply to ayush nigam Cancel reply

Your email address will not be published. Required fields are marked *