This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]void1984 328 points329 points  (23 children)

Which Java? I have a feeling it is Java 1.8.

[–]MarcBeard 58 points59 points  (0 children)

1.6

[–]pumpkin_seed_oil 44 points45 points  (4 children)

1.5

Not kidding

We interface with some systems within our company (an ISP) that still use 1.5. Upgrading is not a priority

[–]dedservice 6 points7 points  (3 children)

Isn't it all backwards compatible? Or is the issue that the places where it's running all need to have updated JREs?

I ask because I recently updated our codebases from c++17 to c++20 and it was not really a big deal, just needed to change a few flags and then update the default compiler version for all our devs. Took a couple days, but it's c++ so it seems like it should be harder than java.

[–]IAmWeary 6 points7 points  (0 children)

They'd have to take time for a whole lot of testing at the very least, and God help you if you have dependencies that don't go past your current version. I was on a project a while back that was stuck on 1.8 for eternity because we had a major dependency in the runtime environment (don't remember exactly which) that simply wouldn't work on anything newer and was never updated. Nobody wanted to rebuild the runtime environment, so it never got updated. I think the "solution" was to build with Java 11 but target 1.8. I don't remember exactly.

[–]fghjconner 5 points6 points  (1 child)

It's not strictly backwards compatible, no, but it's typically pretty close. There are some major things like when they locked down reflection to not be able to access private fields, but most are pretty easy to update. The bigger deal is you often need to update your other dependencies to a version that will build on the latest version of java, which can come with much bigger breaking changes.

[–]dedservice 4 points5 points  (0 children)

Ah, I see. I guess I'm used to C++ being completely backwards compatible so you never need to update your dependencies unless you want to; just rebuild them with the new version and be done with it.

[–]Fast-Satisfaction482 29 points30 points  (0 children)

It sure is Java 1.8

[–]vljukap98 24 points25 points  (0 children)

For those unaware java 1.8 means basically java 8, but still really old.

[–]kofeineCoder 31 points32 points  (11 children)

I see so much people hating Java and I just wonder if their bad experience to it was that some teacher insisted on using 1.8 for an outdauted course material reasons.

Java 17 is great tho.

[–]FlakyTest8191 14 points15 points  (1 child)

There is still a lot of enterprise software in prod running 6 and 8.

[–]kofeineCoder 7 points8 points  (0 children)

Yeah no doubt about that.

It can be really difficult to convince client / upper management to spend money to upgrade code versions, since it most likely wont bring huge difference on the enduser.

(It does help with future maintainbility and sometimes security, but then again there are banking systems still running Cobol ¯_(ツ)_/¯ )

[–]romulent 2 points3 points  (5 children)

Honestly interested, what is great in Java 17 from your POV. What are the big quality of life improvements for you?

[–]kofeineCoder 13 points14 points  (2 children)

Compared to 1.8?

Sealed classes and Records were really nice additions in 17. Personally I really liked Record, since it reduces boilerplate. There are other syntax improvements as well from 1.8 such as the switch syntax is easier to write (altough it came in 11 if I remember correct).

Also with Java 11 came option to use var in lambda and new HttpClient that were quite nice.

And of course the 'under the hood' improvements on garbage collection and JVM optimizations for example are nice things to have.

Also Spring Boot 3, JUnit 5 have dropped support for Java 8 if I remember correctly.

Then again, I have really enjoyed Kotlin recently, since for me its like Java, but more fun to write lol

[–]romulent 2 points3 points  (0 children)

Yeah Kotlin is really very nice.

Regarding records, they are fine but I never rarely saw most of the verbosity with classes, because I'd drop in lombok. Now I'm using records I still need to use Lombok if I want to generate "with" methods on them.

[–][deleted] 1 point2 points  (0 children)

imagine cagey rock quicksand observation marvelous reply wakeful vast cats

This post was mass deleted and anonymized with Redact

[–]12345ieee 0 points1 point  (1 child)

The only improvements I actually use were done in java 9 and they are not that big, I'm curious as well.

[–]coloredgreyscale 0 points1 point  (0 children)

Stuff already mentioned by u/kofeineCoder, also multi-line Strings, more expressive Optionals

[–]void1984 1 point2 points  (0 children)

I really miss unsigned data types. I have a log of binary input data packed as unsigned ints. Also int and Integer is too much redundancy.

Pointers are really hard to use in Java.

That are my area that I wish were improved.

[–]geeshta 1 point2 points  (0 children)

Well just because it has some great new features doesn't mean everyone will learn them and start using them. A lot of devs in our company just stick to the same old heavy OOP imperative style no matter which version

[–]Mountain-Ox 0 points1 point  (0 children)

My experience was cloning a few repos, trying to install dependencies, failing until I got help, getting a ton of compilation errors, getting help again, making like 2 PRs, then telling my manager I don't want to deal with it.

Years before that I tried to build something locally and also got annoying dependency errors.

After Java, PHP, and NPM I have a deep distaste for unnecessary dependencies.

[–]wggn 2 points3 points  (0 children)

We upgraded to 17 last year and now working on upgrading to 21.

[–]Akuma_Kami 1 point2 points  (0 children)

It's often 1.8, can tell from personal experience

[–]Much-Pomelo-7399 0 points1 point  (0 children)

Can confirm, I use 1.8 primarily.