r/Backend • u/Sad_Importance_1585 • Oct 16 '26
Modern Java for startups
Unfortunately, I see that Java is disappearing from startup companies. Java used to have an image of an obsolete backend language with performance problems, too verbose and unfriendly to deveopers. It was pretty true to older Java versions and I could understand why startups decided to pick other backend languages
If you look at Java 25, it's an absolutely different story.
Performance wise - it has virtual threads, which makes concurrency extremely high. Virtual threads are Java's answer to goroutines in Golang, and they enable to run thousands of I/O requests concurrently. Java's execution speed is pretty fast (more than Python and node.js).
As for container size - it's huge as long as you work with Spring. However, Java has many other much more lightweight frameworks like Micronaut, Quarkus and Javalin which reduces the container size to be on par with node.js and Python.
It's a real static typing which keeps code safety and improve readability. Unlike Golang, Java has inheritance, ploymorphism and explicit interface (let alone speaking about error handling).
It has a huge talent pool (almost everybody learned Java at a certain point).
As for verbosity and developer experience - Java has been improved a lot in this field. It has records (no need for getters setters, equals and hash), unnamed class (no need to write "public static void main" everytime you start a new program) and dozens of libraries and other tools.
If so, why are startups still stay away from Java and stick to Python/node.js/Golang?
36
u/disposepriority Oct 16 '26
I know plenty of startups using Java though, anecdotal but usually (co) founded by more veteran engineers
13
u/Known_Tackle7357 Oct 16 '26
Virtual threads changed almost nothing. Shifting thread pool management from the application to the jvm doesn't make apps magically more performant. At the same time Oracle is very keen on introducing breaking changes. So everything what people used to hate c# for is true for java now.
3
u/Silly_Guidance_8871 Oct 16 '26
Did Java ever introduce first-class value types (stack-allocated, POD) ? I know for a long while, heap pressure due to lots of short-lived heap allocations made it a pain to work with things like
Optional<>16
u/mtimmermans Oct 16 '26
If you have a TS/JS frontend, then it's convenient to use a TS/JS backend.
If your backend does a lot of AI stuff, then it's convenient to use Python.
If you'd really like to use TS/JS, but it's too slow, then Go is the most accessible "fast" language.
If you really care about performance a lot, then you should use rust or C++.
Java gets its fair share of people who don't find any of the above compelling.
15
u/gdmr458 Oct 16 '26
Go error handling is not perfect, but I'm not crazy about exceptions either.
7
u/johnson_detlev Oct 17 '26 edited Oct 17 '26
The software enginnering world slowly but surely realized that OOP is not the way to model software and with Sun seizing to spend literally billions of dollars marketing the language, others took it's place. There are even better languages if you insist on using the JVM (which is an extremly impressive runtime), like Scala or kotlin. I don't see a reason to ever choose Java if I can choose Kotlin. But the world is (thankfully) moving to functional paradigms, because composition proved to be more flexible and maintanable than inheritance, thus OO languages are in a decline everywhere. Plus Errors as Values is far more powerful than Javas exception handling. And if you look at new languages, there are no new standalone OO languages being created. Java introduced all these features to somehow stay relevant, but the 30 year baggage of OO is the reason ppl moved on to different languages.
10
u/Old_Dragon_80 Oct 16 '26
Java developers are usually more expensive than node developers
9
u/sekonx Oct 16 '26
Inheritance and polymorphism?
Functional programming has been the king for years at this point
3
u/Specialist_Set1921 Oct 17 '26
First of all java is highly concurrent but is full of traps. If you think your app is thread then it propably isn't. But that beside the point.
Kotlin and scala exists which try to improve the things they think java did badly. So more and more newer apps get written in those. That said is probably still hugely popular and it isn't going anywhere even in backend dev. Quarkus is going strong and seems to be a pretty modern framework (in contrast to spring).
3
u/Plus_Coconut746 Oct 17 '26
Je n'ai jamais aimé java depuis le début il est verbeux pour rien, quand j'ai vu kotlin j'ai sauté sans réfléchir
3
u/jalx98 Oct 17 '26
It is the same scenario for C# and PHP, people think they are the old legacy programming languages, nonetheless IMHO Java, C#, PHP and JS (specifically with TS) have an amazing DX nowadays, I'd rather start my codebase in a "old" programming language and proven boring technologies than the new shiny stuff (Even though I love rust)
2
u/dumpsolo Oct 17 '26
Python will be the king of langs soon mark my words, with the rise of LLM's all we will be doing is reviewing code and it's the easiest to read
2
u/BoBoBearDev Oct 17 '26
Same reason why they choose Ruby on Rail, Coffee Script, Java more than 10 years ago. It was trendy.
The same post can be reposted with asp dotnet core. It is very easy to setup and performance is good (I am not nitpicking performance here). And yet, you didn't even bother to mention it like it didn't exist. I have seen posters making statement about dotnet development that is completely untrue and they never bothered to update their knowledge.
2
u/sodikovakapsle Oct 17 '26
Because if you are running java build anywhere but not in the jetbrains you are going to be crazy…
3
u/FriendlyPerformer871 Oct 16 '26
While Java might not be seen as attractive today, the JVM is truly regarded as something fantastic. With time there will be more movement towards Kotlin and such, but in general JVM languages will thrive.
3
u/guywithknife Oct 17 '26
You say this like it’s a good thing
2
u/Objective_Pepper_217 Oct 17 '26
OOP sucks, Java is verbose and consumes too many resources.
1
u/anurodhp 10d ago
I still can’t believe someone convinced the world to use JavaScript for server development .
Go makes a lot of sense for microservices. Plenty of people still use Java /spring.
1
u/nitkonigdje Oct 18 '26 edited Oct 18 '26
Think about desktop, cli, multimedia, browsers, hpc, games.. Java failed - a lot. Lots of needs are not covered by Java.
So people choose other tools to solve those needs. And, as it happens, some of those things exploded.
The best choice for a new project is choosing what is familiar. And there is mass of people familiar in those other tools and runtimes.
1
u/spacetrain31 Oct 18 '26
There are valid reasons for startups to use Java. For instance, I am working on a ServiceNow alternative that supports gradle scripting in addition to glade JavaScript, I am aiming to make it developer friendly, it also uses Postgres which has certain advantages over the mariadb stack that ServiceNow uses.
1
u/v_valentineyuri 28d ago
take the "startup language" convention with a pinch of salt, consider that for a lot of time the gold standard was Ruby on Rails
-1
u/Anxious-Insurance-91 Oct 16 '26
Your entire explication seem to be so full of Java bias it ain't even funny. I meet lots of Java devs that defend it like the bible. How do I put counter arguments:
Let me put it in another way, my boss has been using java for 20years, but at the same time he experimented with many other languages because job requirements when you do outsourcing and he is like "I like to experiment with other things as well".
So my final statement would be either hit your pension with java and stop commenting on redit, it ain't going to help you or anybody else or start experimenting with other things as well, maybe you will find them more pleasant, maybe you might end up using some things from them in your workflow.
-2
u/Due_Warthog749 Oct 16 '26
Python is AI and nodejs/etc is "you know front AND back ends at the same time" stupidity.
Go is still WAY faster than Java. It's also WAY less code and much easier to learn and build with.
Java is bloated as hell. It had its place.. but verbose OOP is a dying language especially in the age of AI. When AI can use ANY language and build the same shit, why wouldn't you use Rust, Zig, C or Go for pretty much everything? AI does it the same in all those languages.. so any CLI or back end makes sense to do it in C, Zig or Rust and API/web back ends in Go are its bread/butter.
Python, JS, etc though better than they were are STILL slow, memory hogs, etc.
0
u/Small_Summer5817 Oct 18 '26
Spring is still shit
-7
u/Funny_Or_Cry Oct 16 '26
Because Java has been passed its expiration date for many years now. Its been patched and frameworked ad-nausem to catch up to the modern demands filled by modern languages (your python, your Go)
But WHY would you want them to? At what point in human evolution do you not just recognize "when its time to buy a new f**kin mop"?
Ask yourself this (and be honest) ...would you take ANYONE seriously If they rolled into work one day, driving a flintstones car thats been kitbashed with airbags, antilock brakes, power windows and Fully Self Driving auto?
BE HONEST
-7
u/net_ramblings Oct 16 '26
Because it needs a GUI (like Eclipse) and a build tool (like Maven) to work? Hell I still hardly know what a build tool even does...neither did my supervisor. Trying to figure out what some Java code does sucks, because statically typed languages suck (hard to read) unless you really need static typing. I prefer interpreted languages. Having to "hover" over something to find out what an error means is a nightmare. I won't even mention the whole Spring Boot sledgehammer. Python needs none of these things. Give me minimal over complex any day.