Understanding usage of OpenJDK vs Oracle JDK [closed] - java

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am trying to get my head around the personal and commercial usages of oracle jdk vs open jdk and need validation and inputs on my understanding.
OpenJDK: Free for personal and commercial use.
Oracle JDK: Free for personal, paid for commercial.
From an organization's perspective, it will be cost-sensible to go for a free version using open jdk rather than shell out money on licenses. So why ever opt for an oracle jdk? What's the trick here?
One possibility I can think of is support. Open JDK has no long term support, has a new version release every 6 months, so if my application is running on Open JDK 8, after 6 months with the new jdk being made available, there are chances of my application to stop working?
If yes, that leaves me with the following options.
I would need to either migrate to the newer open JDK version.
Had I been using oracle JDK all along I had the guarantee from Oracle that my app still works even after whatever new releases.
Since up-time of products is crucial to the organization, folks don't mind shelling out on oracle jdk licenses than landing up in a situation where you saved bucks but on one fine day your processes stop working.
Is my understanding correct, and if not what all am I missing?
Yet another perspective I have in mind is how is the release of new open jdk version going to stop my applications from working, my app is still running on previous version of openjdk which is perfectly compatible - but yes I might not be able to leverage the new features released in the jdk if I do not migrate.
Thoughts?

Related

Updating from Oracle Java 8 to Adopt OpenJDK [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
i would like to update from Oracle Java to Adopt OpenJDK.
Therefore i have some question before i start doing the update:
Some information about the application i use:
2 applications
Application 1 uses Java 8
Application 2 uses Java 11
My Questions:
Are there any known problems updating from oracle Java 8 to AdoptOpenJDK 8?
Are there any known problems updating from oracle Java 11 to Adopt OpenJDK 11?
Is it even possible to run a Java 8 Application on Java 11? (Can i use Adopt OpenJDK 11 for both applications?)
Is there any guideline to update from Oracle to Adopt? (Or just straigt forward?)
best regards
For a given Java version (since Java 8), the various commercially-supported OpenJDK builds are almost drop-in replacements for the Oracle JDK.
If you're writing an application with a GUI, you'll find some differences in the fonts, and in colour profiles. The Oracle JDKs also have better support for Java Flight Recorder (if anybody uses that). There's little support in OpenJDK for the ancient Java Web Start, but there are alternatives.
In my experience (which is nearly all in middleware), choice of JDK (for a given version) is almost always a decision about support, and rarely about features. I've rarely encountered any technical problems moving from Oracle JDK to OpenJDK, or vice versa.
I've also not found any problems running Java 8 applications with Java 11 and later. However, Java 11 decoupled several components -- again most related to GUI applications -- into separate JARs.
But, in the end, this is all a matter of testing, isn't it? If your testing is sufficiently thorough, any problems with compatibility will be flushed out. I certainly wouldn't rely on anybody else's claims of backward compatibility without thorough testing.

Java 10 migration from Java 8. Running services in production [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
We want to migrate all our production services to Java 10 from Java 8. As I understood, we might face issues with builds (gradle etc.), dependencies etc. for development. But when it comes just to the JVM itself, i.e. running services, will we face any issues if we just install JVM 10 in production to run our jar services?
I'm not sure why this has been downvoted since it seems a reasonable question.
Oracle's own guidance for moving applications from JDK 8 and earlier to JDK 9 and later is "applications that just use java.se should just work". If you have not used (directly or indirectly via a third-party library or framework) any JDK internal APIs (sun.misc.Unsafe is the most infamous) then you can leave all your application code on the classpath and this will most likely work without change. There are a few differences that might catch you out with changes to things like command line flags.
I've written two blogs on this, which might be helpful to you:
https://www.azul.com/jdk-9-pitfalls-for-the-unwary/
https://www.azul.com/jdk-10-pitfalls-for-the-unwary/
You should also bear in mind that it doesn't make any sense to migrate to JDK 10. JDK 11 will be released next month and, at that point, updates for JDK 10 will stop. It would be better to migrate to JDK 11. If you're looking for long-term support Oracle is now charging for this. Check out our Zulu OpenJDK builds.
A good starting point is the JDK Migration Guides on the Oracle download site. The JDK 10 Migration Guide covers migration from JDK 8 to JDK 10 and can be found here:
https://docs.oracle.com/javase/10/migrate/toc.htm
Another good resource is the JDK release notes as these include notes on the known source, binary and behavioural compatibility issues. You can find the release notes for the JDK 9 and JDK 10 releases linked from here:
https://www.oracle.com/technetwork/java/javase/jdk-relnotes-index-2162236.html
Another resource is the videos from conferences. I've prepared several times on the topic of migrating to JDK 9 and beyond. A recent one from Devoxx BE 2017 can be found here:
https://www.youtube.com/watch?v=uSR5JroBp34

Can and should I use JDK 9 for development of Java 7 / Java 8 software? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
The target environments of my code use older Java versions (Java 7, Java 8). I use JDK 7 for development.
Will there be advantages if I use the most up-to-date JDK for my development, which is JDK 9 (and specify source=1.7 and target=1.7)?
I am aware that my code must not use any API which is not availabke on the target platform.
For the can I? Yes. Since backwards compatibility is important in Java, there's no technical reason why you couldn't do it. Sometimes company policies mandate a specific JDK version for development though.
In general the main advantage of using a later version of the JDK than what you're developing for is getting familiar with the later version. This may also increase your interest to migrate the software itself to a later version, if you notice it to be useful: for example you notice you love lambdas, so you migrate from Java 7 to Java 8.
Since the resulting bytecode is the same (not that it really matters) and the tools you use usually don't depend on the JDK, it has very little other effect. You can (usually) run code safely on newer JREs, so there's no difference with that either.
For the should I?
Whether you should start using JDK 9 now is primarily a matter of opinion. As Oleg pointed out it's not actively pushed everywhere, so at least you're not late and have time to consider moving forward for a while still (maybe toy around with it first before considering it for work use). Due to the large architectural differences between Java 8 and Java 9, I'd expect there to be a lot bigger gap in acceptance than between older versions.
However it's not all gloomy. There's a pretty good wrap-up of the features here and even if you are sticking to Java 7/8 projects for the time being, I see no reason not to do that on JDK 9 when you feel you're ready to have a look at it (and there is no hurry). I haven't installed it yet, although I've read about the decisions (good choice they didn't remove Unsafe).

How to download JRE 1.8 for production environment? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'd like to use some Java8 features in my program. But I should deliver the program within 10 days and seeing that JRE 8 isn't available by oracle worries me. I see that Java8 features have been estabilished and looks to be very stable. My project is in the production camp and not for experiment.
When I search java runtime environment 8 or 1.8 I find nothing published by oracle. Am I making a mistake or I will have to install JDK8 for the client(The worst option). Or I should rewrite all the Java8 codes and make the software compatible with Java7.?
Is there another vendor who has the Java8 ready and if there is, is it wise to use their JRE in spite of the oracle one? Will it remain compatible?
Java 8 is not yet officially released, not from Oracle or any other vendor. There exists pre-release versions, but for a fully supported solution you have to wait until next year. You shouldn't depend on java 8 features yet for production quality code.
Update
Java 8 was fully released on 18 March 2014. It can be downloaded here (jre) or here (jdk).

Which JRE 7 version should I use on a linux server in production ? Is it always the latest one? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
Should I always use the latest JRE version of Java 7 for a ubuntu production server ? Or should I be careful while upgrading between these minor versions too ?
Does the same rule apply to while making a choice between minor versions of Tomcat7 server?
I'm asking this in context of making a choice only amongst the minor versions of Java 7. Also please mind I'm asking this for a PRODUCTION server so I need extra carefulness.
This is a security issue; the minors are almost always security updates. Use the latest of whichever JRE (Oracle, OpenJDK) you choose.
I would suggest you to use the latest one, but at the same time, i would suggest to move your updates first on a stage server , test them thoroughly be fore moving to production. This is because, many time the project code uses library/jars who are compatible only with certain version of JRE, and upgrading JRE version might break them. So, either you need to update those library /jar as well or you live with current JRE version.
If those jars are not being maintained, you may be out of luck.

Categories

Resources