I got into a rabbit hole when I needed to purge secret data from a repo and I learned about BFG repo-cleaner.
The thing is, it's written in Java and it requires a Java Runtime Environment (JRE) to run. Having been bitten a few times by not keeping stuff up to date (looking at you, Ruby), I checked my current version, which is 9. I think I installed it a few years ago when I was helping my son set up Eclipse for a uni project. I think I also have a version 8 JRE downloaded from java.com somewhere in my system as well.
Because I haven't touched Java for years, I set out to find out which version of Java I should have, both to run programs and to develop (since apparently Java is so great for back-end), and I'm utterly confused.
What I found out:
- Java 8 is free for users and developers. However it's super old and apparently only supported until Dec 2020 (according to Oracle's FAQ).
- There is an open source version of the JDK available for developers on jdk.java.net. The current version is 15.
- Oracle keeps a tight grip on the JRE. As a user, if you run a java app for your business, you have to pay a subscription. If it's for private use, you don't. But they point you to java.com where the latest JRE is version 8. So I have no idea how you'd run a program made with JDK 15.
So my question is: If you write programs with the latest open source JDK, say JDK 15, which JRE are your (non-business) users running? Do they have to install the JDK? Or do you distribute the JRE that comes with the JDK? Or do you bundle the java program into some sort of executable, like you can do with python? Or... what?
I couldn't find an answer so maybe I'm asking the wrong questions. I'd be grateful if someone could shed light on this.