r/javahelp • • Oct 11 '19

Why we still use java 8

Hey everyone
I know that new releases of java bring us new compilers and vm optimization and new language features.

So, why developers still use java 8 for their projects ?

PS: sorry if question is weird or stupid. do not hate me in comments pls.

27 Upvotes

51 comments sorted by

20

u/Slaves2Darkness Oct 11 '19

What is the Java 8 you speak of? Around here we use Java 6 and like it.

8

u/cipher02 Oct 11 '19

Well that sounds ex-stream-ly inconvenient!

-1

u/nokinobi Oct 11 '19

I mean why we don't use java 11 for example. with new compiler, gc and languages features

7

u/Slaves2Darkness Oct 11 '19

Cause corporate still has not coughed up the cash to re-mediate those apps that can't run Java 7+

23

u/cipher02 Oct 11 '19

A lot of software in production is large-scale and upgrading to the latest major Java release isn't high priority compared to adding new features or fixing bugs, because it would take more time than it's worth (to the product owners)

Maybe it sounds a little disheartening but have also seen it quite a lot where work for reducing tech debt gets pushed down the priority list as well - It would provide long-term benefit and cost savings, but won't bring in money in the short-term so doesn't get done

8

u/E3FxGaming Oct 11 '19

Android only fully supports Java 7 and a subset of Java 8. Using anything newer than Java 8 doesn't make any sense for me.

Even when I'll eventually move on to developing stuff with Kotlin I'll probably still have to use Java 8.

26

u/TwixySpit Oct 11 '19

I think the three main reasons :

  1. Nobody can understand Oracle's licensing, and people are still using the Oracle JDK, so they're still using the JDK versions to which the license doesn't apply.

  2. It seems that Java is being taken in a strange direction by people who don't seem to be Java developers at heart. A lot of the features and syntax changes added to later versions of Java feel pretty pointless to Java developers.

  3. Applications written in Java 8 won't run in later versions for many reasons.
    Most large corporates have a legacy codebase dating back to Java 5 or so, it's simply not possible to move to any version of java past 8.

11

u/ObscureCulturalMeme Oct 11 '19

You are absolutely correct.

My customers are some large, large organizations.

Reason 3 is the major killer for them, followed closely by Reason 1. (The customers don't care about Reason 2 as they themselves are not developers.) Unfortunately, Oracle doesn't consider either of those failings to be their own fault, to the detriment of us all.

-4

u/TwixySpit Oct 11 '19

I can't see a move from 8 anytime in the future.
Further, I think Java is going to split.
The later versions seem to be an attempt to make Java something it isn't.
Adding functional programming etc. to Java seems pointless to me.
If people want Java but not Java, they can use Kotlin or Scala etc.
I think Java people will stay with 8, and the people who want other features will move to other languages.
Java will take 8 as a baseline and move forwards from there, with essentially any security fixes.
I personally won't be making efforts to move to later versions of Java.

3

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

I think Java people will stay with 8

You live in a really really small bubble if you think "Java people" are not embracing local type inference, streams, FP, etc.

3

u/Kraizee_ Oct 11 '19 edited Oct 11 '19

Adding functional programming etc. to Java seems pointless to me.

What do you think is pointless about adding functional programming?

I think Java people will stay with 8, and the people who want other features will move to other languages.

Java 9+ uptake would say otherwise.

Most large corporates have a legacy codebase dating back to Java 5 or so

I wouldn't say "most" by any stretch of the imagination. There are certainly some still using pre java 8, but the majority of developers are on java 8. See below.

https://www.jetbrains.com/lp/devecosystem-2019/java/

https://www.baeldung.com/java-in-2018

https://snyk.io/blog/jvm-ecosystem-report-2018/

2

u/TwixySpit Oct 11 '19

Well we'll see what happens.

4

u/wildjokers Oct 12 '19
  1. Licensing is pretty easy to understand. Just use an OpenJDK build.

  2. What? Examples? Pretty bold to be speaking for all java devs.

  3. Umm, what? Not true at all. I have taken many apps above java 1.8, including some that were first written back when Java 1.3 was new and shiny.

You appear to be just spreading FUD.

4

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Yeah. He's one of those people who don't want to learn new things. I think these people are pretty much the worst component of the Java community; they are generally against anything they don't know already because they just want to keep their job at a bank, not really do anything all day, and pretend they're busy in meetings 7 our of 8 hours a day.

4

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Nobody can understand Oracle's licensing

Java is open source and OpenJDK is the Java JDK. There's nothing to understand. There are no licensing issues unless you need to use Oracle JDK. Which almost no one does.

It seems that Java is being taken in a strange direction by people who don't seem to be Java developers at heart.

Interesting bit of gatekeeping. The only slightly controversial issue was local type inference and that is being added to pretty much all modern languages. Heck; even C++ has it.

Applications written in Java 8 won't run in later versions for many reasons.

Migration is generally dead simple unless you are doing nasty stuff with sun.misc.Unsafe for example.

What you gave is not a list of reasons, but a list of excuses. Subtle difference. The main issue is "I don't wanna".

3

u/nerdyhandle Oct 11 '19 edited Oct 11 '19

Man point 2 is what makes me sad. A lot of the changes that are being added to Java are just bloating the language. Like does Java really need to contain both Object Oriented Programming and Functional Programming?

Like the syntax is already getting messy because it's trying to be multiple paradigm which in my opinion it shouldn't. Java was originally designed as an OO language and it should stay there. If you want a functional language go out and use one of the many that already exist.

Also, let's not add every fad to the language which seems to be happening.

Anyways that's just like my opinion man and my opinion doesn't really matter.

3

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Man point 2 is what makes me sad. A lot of the changes that are being added to Java are just bloating the language. Like does Java really need to contain both Object Oriented Programming and Functional Programming?

Yes, because they work really fucking well together. If Java does not keep pace with other modern languages it will die out eventually.

-1

u/nerdyhandle Oct 12 '19

I disagree. Java shouldn't become an amalgamation of all the current popular languages. That's how you wind up with a bloated language with messy syntax and that will cause people to go to other languages as well.

2

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Java shouldn't become an amalgamation of all the current popular languages.

Fortunately that's not what they're doing. They are only taking the stuff that works well together with Java. And FP and OOP work just fine together.

1

u/Kraizee_ Oct 12 '19

I'm still waiting for someone to actually explain why adding fp is bad. Fp isn't a fad, its probably been around longer than you have.

-2

u/nerdyhandle Oct 12 '19

Java was designed as an OO language. You shouldn't be mixing paradigms here.

And functional programming has existed for a while but there has never been a super popular functional language. Most were descendents or dialects of the LISP which hadn't really been used much out of research.

2

u/Kraizee_ Oct 12 '19

You shouldn't be mixing paradigms here.

Why not? Please elaborate. OOP and FP work incredibly well together. I suppose if you are so against FP you similarly hate C++, C#, Python, PHP, Rust, and Javascript

-1

u/nerdyhandle Oct 12 '19 edited Oct 12 '19

I've said it like several times now. It makes the language bloated, the syntax becomes messy, and it makes it harder to maintain the language. Following a single paradigm fixes these issues.

I said nothing about hate or that I was against functional programming. In my opinion a language should stick to one paradigm. I'm not a fan of languages adding new fads that come out or even adding the same features other languages have. At some point the language developers are just developing for shits and giggles without a purpose or clear direction.

Again, this is how I feel Java has become a language with no clear direction and everything including the kitchen sink is being thrown in. Eventually the language will become so bloated that devs will start to look for more streamlined and more focused languages.

1

u/Kraizee_ Oct 12 '19

the syntax becomes messy

i.e. You can't be bothered to learn it

it makes it harder to maintain the language

Only in the same way that adding any new feature increases the amount of maintenance required.

Following a single paradigm fixes these issues.

There is really no issue to fix. FWIW java has been multi-paradigm long before FP was included. But I guess we need to forget that for your argument to hold any sort of value.

I'm not a fan of languages adding new fads that come out

FP is not a fad. It is an incredibly powerful paradigm that has existed for a long time and compliments the OOP paradigm.

or even adding the same features other languages have.

What is wrong with adding features other languages have? No language would ever grow if they didn't not take features from other languages. Java is one of the most popular languages, maintains strict levels of backwards compatibility, and is used by a large portion of businesses. That is exactly why it lets other languages experiment with new features and they oracle developers look at what works well and what doesn't.

Java has become a language with no clear direction

They have a very clear direction. New features coming to java have been purposefully slow because they are well thought out and take a lot of feedback from the community.

You are unfortunately incredibly misinformed.

1

u/nerdyhandle Oct 12 '19

I do t think you fully comprehend what an opinion is. It's ok that you disagree with me I am not telling you that you are wrong merely that I disagree.

You don't have to be an asshole and try to start arguments. You don't like what I say you can move a long.

-6

u/TwixySpit Oct 11 '19

Yes.. this is how most actual Java dev's feel.

3

u/8bagels Oct 12 '19

Our large org moved everybody up to 11. It’s been great. There were some api changes that made it a little wonky but just adding a few dependencies helped bridge those gaps. Easy enough. Moving to 9+ doesn’t require you to use modules so it’s pretty easy

3

u/__helix__ Oct 12 '19

So many third party bits just broke. Our shop has spent almost the better part of nine months updating projects - bit by bit, we've fixed everything so we can use JDK 11 and run JDK 8 code. When we get the entire pipeline fixed, we can cut over.

The only real issues we have are JAXB changes, which can be worked around. The timing of it all -- got to get end to end before cutting over.

I'm hopeful I can use JDK 11 methods before the end of the year.

3

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Who is "we"? Tons of companies are on 11 at least.

5

u/[deleted] Oct 11 '19

Because we tried to move past java 8 and codebase died :(

6

u/morhp Professional Developer Oct 11 '19

We are developing with Java 8 because we develop server software and we aren't sure that all users have upgraded to a newer Java version. So better be safe than having to deal with lots of problems.

In another project, we use a library that only works with Java 8 for some stupid reason (they use reflection to access JVM internals), so we can't update there until that is fixed.

New projects are developed with Java 11 or 12 I believe.

1

u/wildjokers Oct 14 '19

We are developing with Java 8 because we develop server software and we aren't sure that all users have upgraded to a newer Java version. So better be safe than having to deal with lots of problems.

If you develop server software why is it a concern if users have upgraded to a new java version? Or for that matter if they even have java installed?

Or did you mis-type and meant desktop software?

1

u/morhp Professional Developer Oct 14 '19 edited Oct 14 '19

Users in my case are the users of our software (essentially the server admins), not the end users.

1

u/wildjokers Oct 14 '19

I see. Can you just list Java 11 as a system requirement and then they can just install it?

We now offer docker images to our clients so the appropriate version of java is in the image. Not all clients use them so the ones that don't just have to keep Java updated to the version we require.

2

u/morhp Professional Developer Oct 14 '19

I see. Can you just list Java 11 as a system requirement and then they can just install it?

That will happen sooner or later, but currently there still are lots of old java installation we know of (as we also do support), where the server owners fear that updating Java will break something, or where their it department is overworked, so they wouldn't really be happy if we forced them to update now without an obvious incentive (as the current version "works fine").

This may change when an important security issue appears in Java 8 or when a library starts depending on a newer Java version ow when Project Valhalla is released and we can have better primitives and lower memory usage.

2

u/PseudosSC Oct 11 '19

Because moving something from 8 to 11 is not trivial. With the module stuff added in 9 you can’t just build with a new version and be done with it (which MOSTLY worked 7-8, and 9/10-11).

Meaning it takes time, and possibly a senior dev. Good luck convincing a project manager to allocate budget for that when it could be used for new features/bug fixes/pure support income.

2

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Because moving something from 8 to 11 is not trivial.

It's pretty trivial. If you're not doing nasty stuff with sun.misc.Unsafe it's generally a matter of making a few Java EE dependencies explicit.

1

u/wildjokers Oct 12 '19

8 to 11 is not as difficult as people make it out to be. I have upgraded several apps to 9 (where modules become a concern) and all you do is add dependencies for the JavaEE code that was removed from the JDK. (with JAXB being the the most common).

I guess some people forget that prior to Java 1.6 JAXB was not in the JDK and you added it as a dependency. It was added to the JDK in 1.6. Then deprecated in 9 and removed in 10 (or 11). So it is just back to the way it was. It's trivial.

1

u/PseudosSC Oct 12 '19

I’m glad your experience is better than mine! I’m guessing it depends on what’s in the project, possibly? Those we tried devolved into hellish ordeals.

2

u/mikepc143 Oct 14 '19

We use Java 8.. because well, it works. Why upgrade? Just because there is "better" out there doesn't mean that it will produce value for the people that pay our salaries. In all honesty, this is the core principal that the java community really doesn't seem to get.. you can do all the fancy things in the world, but at the end of the day there has to be a calculable difference and business value to justify moving beyond what we have in production that provides a calculable bottom-line benefit to the stakeholders.

We are here to provide shareholder value. That is our only goal. Like it or not, if you aren't making someone more money than your salary you aren't doing your job.

Whatever security holes in java8 exist going forward when you do a risk-versus-reward comparison of "we have to do X to get Y", java never wins. The reality is, if we move out of Java 8, we are not moving to Java 11+, we will move to Elixir or Golang. There we have a 0 drama, vibrant community of activists that are psychotically dedicated to the cause of "getting the most bang for the buck". The shotgun'd versions of java post-debacle have been the deathknell for a community that was derived from excellence, but in the end resulted in a bunch of political in-fighting that delivers value to no one! The biggest problem the Java community has now, is.. well.. the community. There are a bunch of visionaries that see the future of computing, and there are the stalwarts who want things to stay the same. The bottom line is, if you want things to stay the same, pick a different fucking industry, because this one ain't for you. That said, if you require growth and value, then you have to think outside the box. Right now Java devs are cheap, so writing your apps in Java is a very cost-effective measure. The problem is, the concepts in the "modern" version of java tend to thin the ranks of the experienced and "forward-thinking" crew. It is much easier to simply learn another language, than adopt a back-assward approach at the modern.

Modern Java syntax is absolutely SHIT. I say again, Absolutely Shit. When Microsoft (C#) can do a better job, you know you have seriously fucked up. Not only is it an SO-fest (eg. new developers constantly hitting stack overflow to solve issues), but in the end it literally makes NO SENSE. It only makes sense when you are intimately familiar with the components and that is simply fucking bullshit. For a lines-of-code comparison to do even the most menial task, Java has fallen far behind the competition. Because they did it in the name of "helping people". Java is amazing, and great and all that. But for engineers who actually give a fuck about the product they're delivering, rather than the community they support? There are a lot of great alternatives.
At the end of the day modern engineers just want to keep their job, Java 8 does that in spades. If we actually wanted better, we wouldn't pick java, because seriously.. why? Java has one and only advantage: it is taught in college, so the kids are familiar with the syntax. Anyone experienced will tell you that syntax doesn't mean shit, because at the end of the day whatever you type is going to be handled by an sdk or an interpreter. Syntax isn't nearly as important as the kids believe it is.

Security holes? Let's do a risk-vs-reward comparison of the security holes in java 8 versus later versions. Yeah. Exactly. Any issue that java 8 had, will be an issue in java 20, it doesn't matter. The problem is that java is slow. It has always been slow and will always be slow, because it tries to wrap its arms around the world, in a loving way. In an async world, Java lost. It's tried really hard to stay with the times, but in the end it lost. No, as the job boards will show: it is great. The fact is, Java died after 8. It just doesn't know it yet.

1

u/shaqthegr8 Oct 11 '19

It could take a lot of time make the switch for a large organization. My work still use java 8 for their softwares working with JRE

0

u/JournalDev Oct 12 '19

There are many reasons for it.

  1. Module System - it breaks almost every enterprise level project that uses third party libraries. And it’s hard to fix them because it’s tedious job to find all the libraries that caused the issue, then add them to module and so on.

  2. Money - this is a common reason for any tech upgrade. Most of the app owners don’t feel there are many new features that warrants the update.

  3. Oracle Licensing - another major reason to stay away from licensing trap as long as possible.

  4. 6 Months Releases - with all the frequent releases, there are not many language specific features coming in every release. Even if we update to Java 13, the latest version. We would be 2 major versions behind in one year.

2

u/nutrecht Lead Software Engineer / EU / 20+ YXP Oct 12 '19

Module System - it breaks almost every enterprise level project that uses third party libraries. And it’s hard to fix them because it’s tedious job to find all the libraries that caused the issue, then add them to module and so on.

That's a gross overstatement. I've done a few migration projects on large enterprise level projects and the generally the only ones with issues were the ones simply using outdated Java EE application servers (fuck WebSphere).

The code itself is almost never an issue. Generally the only thing that breaks is that a few Java EE dependencies are not part of Java SE anymore and were moved into other modules. But that's just a matter of adding to the dependencies.

In my experience "It's hard" is really a matter of people trying another JVM version, seeing some module errors they don't understand, and going "can't be bothered". Which sucks; because you are simply building technical debt you will have to fix anyway.

Money - this is a common reason for any tech upgrade. Most of the app owners don’t feel there are many new features that warrants the update.

This is silly. They main reason to keep up to date is security. Any idea how much money a security breach can cost?

Oracle Licensing

Complete non-issue and I'm surprised to see this from a Java developer. How can you, in 2019, not know that Java is open source?

6 Months Releases

Again an argument from ignorance. LTS releases are not 6 months apart. Besides; better to make a small upgrade every 6 months than a huge one every 5 years.

1

u/wildjokers Oct 12 '19
  1. You can easily ignore modules. They aren't required.

  2. The main reason and only valid one you have.

  3. Licensing is a non-issue. Use OpenJDK. If you want/need support pay a vendor that offers java support (Oracle, Azul, etc)

  4. There is no such thing as a major release anymore so it is impossible to be two major versions behind.

-1

u/JournalDev Oct 12 '19
  1. If you are ignoring the most important feature of Java 9, then what’s the point in upgrading. Just for namesake?

  2. There is no official support for OpenJDK, bigger companies like to have official support even if they have to pay for it.

  3. I don’t get your point. After one year, latest version will be Java 15. So if you have a project on Java 13, you will be 2 version behind.

1

u/wildjokers Oct 13 '19

Every java release comes with bug fixes and security updates. Modules was not the only thing added to 9. In fact it came with a lot of new features. Improved HTTP client, JShell (very handy!), improved java doc, etc.

Correct, if you want support you can pay for it. Java has always been like this. Nothing has changed. If you don’t need support use OpenJDK. I have been with 2 large companies (20,000+ employees) and neither required a support contract for Java.

In your previous comment you said “major versions”. There is no such thing as major releases in Java anymore. Just smaller more frequent releases. There is no need to go to every new release now, but should probably think about it every few releases. It is definitely time to be heading toward 11.

-3

u/cpttripps71 Oct 11 '19

Blah. And here I am on 2 trying to get to 8.

-5

u/[deleted] Oct 11 '19

[removed] — view removed comment

0

u/RemindMeBot Oct 11 '19

I will be messaging you on 2019-10-12 13:55:51 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback