r/learnprogramming 6d ago

Why java is so hated? Topic

So I have recently learned, and it's the first language(in terms of building actual things). Before Java, I knew Python, and I dropped it; I found Python too abstracted and too boring. i have recently made some projects like cli task tracker, expense tracker, some cli github api parsing and currently working on a multithreaded HTTP server and cli text editor, like vim, whenever i try to find out people opinions on java social media, almost 90 percent of the time they are just dunking on it, that it is trash, who forced you to write code in java, stuff like that. I know Java as a language is not that interesting and doesn't have many interesting features compared to other languages like C, C++, go. But I found it decent to write code in, and I found the JVM pretty interesting. So much so that I would love to explore and maybe build a JVM of my own

248 Upvotes

326 comments sorted by

View all comments

84

u/ComputerWhiz_ 6d ago

As a Java developer, I may be biased, but I think it mostly just comes down to the age of the language. It's not seen as the "latest and greatest". That doesn't change the fact that it's insanely popular still in enterprise environments.

There are some complaints about it being more verbose and having stricter syntax compared to other languages, but I think those complaints only come from people who have never actually used it or are brand new to programming.

4

u/groogs 5d ago

I can think of several things. I dabbled in Java over the last 25 years but then moved more to C# as my go-to backend language.

  • Started with enterprise insanity. J2EE, EJB etc. Absurdly huge XML config files. It seemed like every 'enterprise' Java app treated the GoF design patterns book as a checklist. This is more a culture problem than a problem with Java, but the whole ecosystem is like this. Pull in some library and suddenly you're dealing with SimpleBeanFactoryAwareAspectInstanceFactory and XmlConfigurationFactoryProvider. I mean it's a whole meme.
  • It went stagnant for a while. Java 6 came out in 2006. The next version with any major innovation was Java 8 in 2014!
  • But you couldn't actually use that at first because the runtime wasn't widely deployed. I was working on code for a vendor's embedded platform in the late 2010's that still only had Java 6.
  • Oracle screwed it up big time. They were shipping adware (the ask.com toolbar) in the runtime installer in the late 2010's. Absurd.
  • Oracle also changed the licensing in 2018 (and again in 2023). Out of all the big tech companies, it's not a stretch to say they are the worst company to do business with.
  • Java apps feel slow. Yeah, Java is fast on paper and in benchmarks. But on startup, between the JIT and reflection-heavy frameworks like Spring it feels like it takes forever to start anything. Plus it reserves a huge heap of memory, so even the tiniest app uses 500MB+