HACKER Q&A
📣 gkresic

Why do startups avoid Java?


Based on: https://www.workatastartup.com/companies?role=eng&role_type=be


  👤 Conan_Kudo Accepted Answer ✓
IMO, the biggest reason is how broken the Java ecosystem is. Java-the-language is mostly okay, Java-the-toolchain (JVM) is pretty great, but Maven/Gradle/etc. are awful.

Java is one of the few ecosystems that provides a software distribution ecosystem that doesn't allow distribution of sources alongside binaries. Additionally, it is a lot more common for Java dependencies to be a game of Jenga. Take for example, Gradle. Gradle literally cannot be built from source[1] because it relies on a binary cache of dependencies held by Gradle to build Gradle. There are many other examples of this. As a consequence, the Java ecosystem has become a security and maintenance nightmare that other ecosystems simply aren't.

As bad as Nodejs is, it doesn't do this. As difficult as .NET has been, the dependency hygiene is better there. As annoying as Go and Rust are, they provide better guarantees in their ecosystems than Java does. While Python and Ruby are "slower" than Java, they both make it up in developer productivity and transparent, well-reasoned tooling compared to Java.

[1]: https://twitter.com/decathorpe/status/1250048390228041729


👤 ryandvm
This is harsh, but as someone that has done a lot of enterprise Java development, the only reason to avoid Java is the developers. Specifically, the enterprise priests of Spring.

Java is fine language and the JVM is a great runtime, but unfortunately the language itself is like a bug zapper light for graybeard enterprise devs who are not so much "Java developers" as they are "Spring engineers" (though they often refer to themselves as architects). They usually have a flair for overly complex abstraction and an encyclopedic knowledge of a couple decades worth of Spring spells, er, annotations.

They typically don't build as much as they just hook shit together with Spring. Every solution is always, "oh just use yadda yadda Spring annotation/plugin." Sometimes it works, often you end up spending the day learning about yet another convoluted hunk of shit that your project just absorbed. Every Spring project turns into a myriad of black boxes where everything happens everywhere else and you're always just a few plugins short of having what you need.

For enterprises this works... okay. They're big and they have a lot of money, so they usually prefer slow, complex, and consistent over rapid development dice rolls. For startups, a seasoned Java enterprise dev is like a rat. If you let one get in the door you're going to be dealing with a fucking mess in no time.


👤 falcolas
If a startup avoids Java, it’s because the first few coders don’t use Java. That’s it.

I’ve seen startups use almost every language under the sun, including the boring ones like Java, C, and PHP.


👤 0xcde4c3db
Java has its technical issues, but for a startup its biggest liability is that its vibe is the polar opposite of how startups want to see themselves and be seen by others. It's reliable, stodgy, boring, conventional. How are you going to convince people that your project is "disruptive" if you aren't willing to embrace a younger, edgier tech stack?

👤 fn1
1. Because they confuse Java with the standard hibernate/springboot backends that are used everywhere in the industry. Hibernate/springboot is the reason why there are so many monoliths out there that are almost impossible to refactor.

It's not Javas fault, it's Springs fault.

2. They believe Java is slow, but fail to realize that the JVM has actually one of the most optimized runtimes under the sun and can be fast than (unoptimized) C in many cases.

Long story short: Because they have no clue about Java and follow advice without researching it first.


👤 bombcar
Because startups are negotiating with employees for sub-standard pay, usually.

So you need to do things to convince the hotshots to come work for you, and Java is boring corporate coding, it's not the latest hotshit like Rust is.

And conversely, they're also negotiating with VCs for funding, and customers. Being able to describe the hotshot language helps differentiate as to why "this startup will make it work".


👤 tyleo
At this point I feel like C# exists in pretty much the same space but solves the same problems better. Java doesn’t seem to solve a unique problem any more or solve common problems better than other languages.

👤 srhtftw
In principle there's nothing wrong with Java but every Java shop I've worked at has made me sad. Lots of dynamic stuff glued together by plugins, DI, crazy configs, weird XML meta languages, runtime NPEs, stuff falling over at all hours, everyone on-call, etc...

Python shops weren't much better. Enormous products of complexity, plugin frameworks to config other plugins...

Go is not without its problems but at least it reins in much of the dynamic complexity (although systems like K8S built above it seem to add it back). For a lot of things it's better than Java or Python.

I haven't yet worked at a Rust shop but I've used it on a few small things of my own and it seems to strike a good balance and Rust/Wasm looks really promising.

So if I have the choice I'll go with a Rust startup, a Go startup, a Python/Java startup in that order.


👤 alvis
A better question maybe. What is the edge of using java over others? 20 years back it was about cross platform support, but which language is not cross platform nowadays?

👤 KingOfCoders
Out of fashion.

But I've worked in two startups, one sold for $600M and one sold for $200M and both were Java based (The startup I co-founded used Scala (never again ;-) on the JVM eco system and was also successfully sold, though for less than $200M)

Technologies come and go (and sometimes come back like Python). When I started Java in the 90s it was replacing often Perl on the server, as the first apps were writen by Unix admins who used Perl, which went out of fashion.


👤 martypitt
We've built a huge stack in it. (Well, Kotlin). Love it, and hiring is easy.

👤 rlawson
I worked at a startup that used it. Great performance, easy to hire for, library for everything. This was 5 years ago so the .net core story wasn't as good then.

👤 binkHN
Because it’s not “cool” anymore and it was left to languish for many years? In addition, many, and better, languages have come out since it was cool. The de facto replacement for Java is Kotlin, or at least it was until Oracle started caring about it again.

👤 xyzzy4747
You can do everything better in either TypeScript (for cognitively simple things) or Rust (for complex things that need to work correctly and be fast).

👤 nunez
Personally I find it much much MUCH easier to bootstrap a project with Python, Go or even JavaScript than Java, especially when third-party libraries are involved. (I hate dealing with Maven or Gradle.)

Kotlin and Scala are different from what I understand.

Also, from what I can gather, most developers entering the industry come with JavaScript and Python experience. So there's that to consider.


👤 me_bx
Very subjective reasons from one or two decades ago - possibly outdated now:

  * lack of user-friendly UIs in the end product
  * super frustrating *NullPointerException* showed to confused users in (almost) all java programs they get close to - despite java enthusiasts assuring that good programs should not feature that.
  * annoying frequent update popup shown to end users, with bloated process pushing to install other unrelated stuff
  * creating a super tiny dependency program in java results in a hundreds-megabytes distributable because (??)
  * heavy and bloated IDEs
  * confusing JRE / JDK required installs
  * licensing confusion once Oracle made Oracle Java SE paid
  * supposed to be multi-platform but tricky to make it work well on some versions of linux (painful memories using pentaho or gephi, finding the right file where to set-Xms -Xmx flags after a crash)

👤 taylodl
What's the point of a JVM when your server environment is using the x86 instruction set and running Linux? The world today is very different from the world of the early 90's when Java was being developed. You want garbage collection, high performance, a vibrant ecosystem, and good build and distribution tools? Then you want Go.

As many others in this thread have said, using a newer (Go is 10 years old) stack is appealing to VC's, and the hotshot programmers you're trying to attract and trade salary for stock options. This is the best strategy.

If you really need to use the JVM for some reason then consider using another language on top of it such as Kotlin or Clojure. In 2022 saying your hot new startup is using Java is pretty much equivalent to saying you're using Cobol. Don't be surprised if it doesn't generate much interest from investors or developers.


👤 soggybutter
Java has a bad reputation for being bloated and/or slow. I find Java and Go to be fairly similar (both GC'd, both fairly high performance, both statically typed), and yet Go has a reputation for being compact and fast.

Java isn't particularly fun or thrilling to write. If you're a founding CTO or a founding team of engineers, of course you're going to choose something more "interesting" for a greenfield project.

Java isn't as quick and dirty as other languages. I think this almost fully explains the prevalence of node, because after being stuck in the node ecosystem for two years, I truly can't imagine why anyone would choose to build anything substantial in node.


👤 goalieca
Java comes with a ton of unneeded complexity compared to many languages. What is one line of python code to have client tls certs becomes an enterprise exercise in implementing trust stores by extending complex interfaces.

👤 PaulHoule
I worked for 2 that used it.

👤 satya71
Java is great fit for large teams, but personally feels less productive than Python or JS. Startups do start with small teams. The Java overhead doesn’t make sense.

👤 leros
I think a big part of it is cultural. Java is a great language with tons of supporting frameworks, build systems, etc. But it's mostly geared towards larger enterprise companies. For a startup that is trying to be quick and nimble to get started, it doesn't attract the right type of talent or workflows. It can definitely be used for a startup and some do, but the hacker-y startup devs tends to lean towards other solutions.

👤 ocius
Python is simpler than Java. This might not be a very important factor in software engineering of large products, but it is very important for prototyping.

Also, a lot of research in ML is done in Python, and there are quite a lot of startups doing ML, so Python is a natural choice. Same for data science.


👤 deeteecee
I can work much faster on Python than Java and I know both pretty well. I'm not aiming for scalability in the initial stages of my imaginary startup.

That being said, it wouldn't be the worst thing for me to start with Java


👤 sys_64738
It used to be hip and trendy but then Oracle came.

👤 nottorp
What are the legal implications of using Java / the JVM in a commercial project these days?

We're talking about Oracle here.


👤 RamblingCTO
We're using it (ok, but converted a big bunch of it to kotlin haha). Depends on the sector I guess.

👤 trgn
Because java.com looks like a scam website doesn't actually let you download latest java.

👤 rjsw
I have used it in a startup.

👤 jmartin2683
Performance, mostly. It’s in the middle. Why do anything in the middle?

👤 revskill
Because Java doesn't allow multiple inheritance.

👤 cultofmetatron
Java was a mediocre language made primarily to be optimized for midsized companies and aimed to be learnable by mid level engineers. There's a lot of boilerplate and ceremony to do even basic things and a type system that takes time to learn while not providing much benefit.

I've heard its gotten better in recent years but why bother?

- you want the jvm libraries? kotlin is a much cleaner syntax that also runs on android and can be compiled to js.

- need speed? rust is hot and has a lot of mindshare going into it as we speak.

- Need cheap devs you can rotate out on your pivot cycle till you land on a viable business model? javascript lets you build your whole stack in the same language with a large pool of junior to senior talent.

- need websocket or realtime? elixir wins the day there.

- ml? you night have a contender here. jvm based projects like spark and hadoop use the jvm. extensively. That said, scala seems more widely used in production there but its not a field I'm super close to so I could be mistaken.

I guess what I'm trying to say is that java isn't particularly bad but it doesn't have an edge either. there's nothing compelling in it thats going to give you an edge in delivering value to the users.


👤 P_I_Staker
cus it sux

👤 bin_bash
Among many reasons I think one is that it has a poor amount of open libraries/frameworks when you stack it up against other languages. The culture is much more DIY so there isn't a lot to help you get started with a new application.

I've never been a Java dev, but as I understand the package manager story is/was really bad. I've always wondered if that's part of the reason why you see so few open source efforts compared to other languages.


👤 Zachary-_-
Speed. The majority of the talent pool prefers newer tools and frameworks and these are for the most part Javascript based. So you're able to implement faster, hire faster, pivot quicker.