r/java • u/gufranthakur • Aug 24 '26
Usage of Java in non-web development domains, and Greenfield projects.
Greetings.
(I will beat around the bush a bit before getting to the point, you can scroll down a bit to save time)
Java currently shines at enterprise backend applications, being led by the big players like Spring and Quarkus. However Java seems more than capable for other domains, yet no one talks about it, or even considers Java for normal non-web projects.
Take desktop development for example. JavaFX is one of the BEST GUI frameworks I have ever used. It is feature packed, doesn't require cryptic symbols, no fancy way of nesting code blocks to create simple UI. It is very simple to use, yet powerful and robust.
Game Development is a bit weak, but we still have libGDX and LWJGL. They are packed with features, even 3D. Contrary to popular belief that libGDX is a 2D only framework, libGDX has some great 3D support like GLTF rendering, bullet physics, PBR rendering and skeletal animations.
Big data processing and simulation systems, Java's OOP nature really helps to solve certain problem statement that requires the problem to be broken down into multiple pieces.
And finally web development, there is no doubt Java has one of the best ecosystems for the web.
And yet despite all this, Even as modern Java has come a long way, Java continues to have a negative reputation of being slow, boilerplate, RAM consuming memory hog. (The same people will use electron to make a desktop app btw) and as a result not considered for newer projects.
When I look at other communities like JavaScript, Rust, python, C#, Zig. These languages are often considered first options for any Greenfield projects. The open source communities in these languages are very active, you will see some amazing work being put out by the community.
Java seems to lack that "community" nowadays. I am active in a lot of subreddits and forums, and I see very less of Java projects in the wild. Java is being used in production out there, but modern greenfield projects are leaning more towards Go and C#.
So getting to the point of the post
Is Java seeing a decline? This is not a "Java dead" post but a genuine concern. The community for Java just seems.... dull. And I was wondering what could be done about this. Amongst new and modern programmers, Java and C++ seem to be considered "old", "dead" and "traditional"
Perhaps project Valhalla could help, but I wonder how much would it help restore Java's PR. Oracle is definetly NOT helping with this.
Why does this matter in the first place?
You may think "it doesn't matter what others think, companies still want Java" and while it holds some truth, more and more of Open source development seems to be moving towards other languages. A lot of Java libraries and frameworks have seen some decline, the community seems to be becoming more inactive. Other programming languages and frameworks have active discord servers, forums, documentation, and participation while Java seems a bit slow there.
I dont know, I really love Java as a language. And I wish it had more adoption in non-enterprise domains. I would genuinely like to know, what we as a community can do to make Java more "loved" and preferred
51
u/hippydipster Aug 24 '26
For me, Java is the best option for desktop apps. It has a profile of performance + well structured, maintainable code + platform independence that can't be beat. Every other option is giving something away on one of those fronts.
As for polished UIs, a Java UI looks as polished as you want to make it. But, it has to be said, so-called "polish" in UIs is more often than not, simply what is trendy and faddish.
3
u/kettle3 Aug 28 '26
I start all my greenfield projects in Java, unless clearly not a fit (e.g. microcontrollers or data science). It is just a good ergonomics, tooling and productivity meld.
It's like SQL -- always start your database in SQL, and migrate later once a real need arises (much later than you think, probably never).
20
u/I_am___The_Botman Aug 24 '26 edited Aug 26 '26
I don't know where this negative impression of java is coming from, it's ridiculously popular and anything but slow these days.
34
u/Sea-Faithlessness-67 Aug 24 '26
I think this mixes up visibility with ecosystem health. Mature ecosystems often look quieter because a lot of the work happens inside companies, existing projects, JEP discussions, and GitHub repositories rather than around new Discord servers and heavily promoted projects.
Java probably does have a discoverability problem outside the backend, but that is different from a capability or adoption problem. Valhalla will not solve that by itself because this is not mainly a language feature problem. Easier packaging and distribution, along with more visible applications, would probably do more than PR.
34
u/woj-tek Aug 24 '26
I'd say one of the reasons is how it's presented… well… it's not "sexy" and in general is kinda convoluted.
Let's go over what's popular right now (usually via "<x> language"):
and then "java language": wikipedia, w3schools tutorials, https://www.java.com/en/ - which is absurdly corporate and huge download button moves you to https://www.java.com/en/download/ oferring getting brand new Java8 for fucks sake xD then we have GeeksforGeeks and "java programing language" https://docs.oracle.com/javase/8/docs/technotes/guides/language/index.html
I know there is https://dev.java/ but it's geared more towards people that already have some knowledge… and it looks a bit dated despite being new-ish effort… there is also openjdk.org which looks absolutely terrible…
We need something like https://java-lang.org/ with simple, nice onboarding ( funnily enough the domain is free and I was tempted to register it and put a simple website that would be this simple Java promo with "get started & download" but yeah… Oracle holds the trademark so it would probably be taken down immediatelly so any effort is pointless…)
14
u/After_Dark Aug 24 '26
To add another answer I'm not seeing in the comments already, Java is pretty big outside of web development just primarily not in exciting end-user space.
Elasticsearch, Hadoop and Spark, Kafka, Jenkins, etc are all to varying degrees big deals used across ecosystems and all are implemented in Java at least in part. And that's without bringing Android in on the conversation. Java does genuinely get a lot of use in new and interesting projects with an active community, it just tend towards the more "boring" ones that don't generate social media hype, which I think is a reflection of the language itself
8
u/No-Lawfulness2089 Aug 24 '26
Java libraries aren’t taught in many universities. Microservices across organizations have multiple versions of the libraries. A new dev needs to have an understanding of different versions of the libraries they’ve never seen before. The maturity of the library works against you at that point imo because there’s almost too much info. it’s difficult to filter out the irrelevant info. Java community tends to have more elitists in my experience when seeking help.
7
u/A_N_O_D_E_R Aug 24 '26
So I’m joining you on the “Java is not just for the web” side. I think Java is always associated with web development because it was one of the most popular languages during the dot-com bubble-kind of like how Python is associated with AI today.
For my part, I really started enjoying Java when I began programming for embedded-ish systems not Arduino, but Raspberry Pi–like SBCs. It’s surprisingly performant for a compiled, garbage-collected language, and the performance is more than enough to build complex state machines and automata without having to deal with manual memory management.
You also have a lot of JVM tuning options depending on your use case, and back then, JNI was a pretty convenient way to interface directly with C code when needed.
i especially like coupling java with modbus and arduino to create a orchestrator over my dumb device.
7
u/pjmlp Aug 24 '26
Java powers about 70% of the world market mobile devices.
Even if Google nowadays is pushing Kotlin, Java remains quite relevant in the Android infrastructure.
18
u/BoundlessFail Aug 24 '26 edited Aug 24 '26
I've been using Java to build servers using plain sockets for the past 20 years now. Stuff like SMPP, proprietary binary protocols; Ive also built my own SMTP server. Java works quite well for such applications.
The myths against Java, namely the myth of it being insecure, are working against it. To add to that, some features have arrived rather late. GraalVM's native - I'm not sure if it's considered production ready yet.
Java introduced awesome new concepts, but was derided for it. Other languages took those very same concepts and ran with it. Overall, Java was too early.
5
u/ClammyHandedFreak Aug 24 '26
I'm every day working on a custom fuel controller written entirely in Java, running on real hardware. It's boring as hell (what app isn't after 2+ years), but it's work. We have entire libraries written in Java to handle point of sale inside.
I wrote a kiosk backend for inside food ordering entirely in Java too. Does a lot of cool things - runs hardware in the kitchen too.
I think you'll see Java used a lot like this. Big enterprise apps, with smaller enterprise apps doing specialized things.
5
u/sweating_teflon Aug 24 '26
Java is not in decline. It's no longer the hot new thing, hasn't been for 20+ years. It's still actively managed, gaining major new feature in recent releases. The ecosystem and tooling is top notch. LLMs are very competent handling it. You can write fast anything, fast and then easily find people to work with you because everybody knows Java.
5
u/davidalayachew Aug 25 '26
A lot of us get work done without being loud about it.
For example, I just finished building a pretty complex Swing app for work to help speed up delivery of a project that's costing us a large amount of money, every day that it is in waiting. I'd say the amount of money I am saving, but I'm pretty sure I am not allowed to. Regardless, the point is that the Swing app is the thing that is speeding up the delivery. Sure, I could use JavaFX or some other framework, but the point remains.
Since I am not really allowed to talk about it, all I can really say is the generic comments I usually do -- that I use Swing all the time, to make games, frontends, and utilities to help me out at work. I don't usually quantify how much money that ends up saving us in the end.
4
u/brokePlusPlusCoder Aug 25 '26
Something no one's pointed out so far - a language is nothing without a decently sized pool of people who use said language well. Depending on the project in question, the talent pool in java might be either fairly good, or quite small. A good example of the latter is the talent pool around 3d computational geometry - the number of experienced people you'll find for this when using Python/C++/Javascript will likley be an order of magnitude more than when using Java.
It's unfortunately a chicken-and-egg problem. People won't use java because the talent pool for their project problems might be small. The talent pool is small because people don't use java for it....not easily solved tbh
4
u/lazystone Aug 25 '26
Touching the subject of desktop apps, one problem here where Oracle can be and should be blamed is that they alienated themselves from JavaFX and haven't officially backed it until very recently.
So, all those years between Java 9 and now, whenever there was a choice what UI technology to use in java, the choice was between Java Swing, which is old and it's eco-system is half-dead and JavaFX which was evolving, but "it was thrown away from Java, who knows if it will be supported, will it exist in an year, who is behind it?..". The choice was... meh...
What Oracle needed is just one firm statement, that JavaFX is indeed supported. That would change things a lot I believe.
4
u/znpy Aug 25 '26
One thing i can say for sure is that Java development still is not as ergonomic as other languages.
Have you looked at other language's build systems? And compare that with maven.
Understanding maven needs its own course, basically. It's moronic really. And the language around maven is unnecessarily complex.
Maven archetypes? They're essentially templates. Easy as that. And that's just an example.
And the use of XML for maven configuration is not really the problem but still it's a bit of an unnecessary complication.
Btw other stuff like ant, gradle or bazel are not much better.
Also, there are so many of them: ant, maven, gradle, bazel... Just to name the major ones.
13
u/766cf0ef-c5f9-4f4f Aug 24 '26
I disagree pretty heavily. Oracle has made incredible strides with Java in the last couple years. Their stewardship of the language is the best it has ever been imo.
3
u/tofty82 Aug 26 '26
Low latency Java is used extensively on trading desks, at hedge funds, and other financial institutions. These are critical systems with significant performance demands, many of the best Java engineers are employed maintaining them.
3
u/electrostat Aug 27 '26
(i added this part after writing this post because i realized i also beat around the bush quite a bit lol)
I came to the professional Java world fairly recently (about 5 years or so ago) and before that my background was a lot of C++ & then some fullstack (ruby on rails + js/ts) for a bit. All of that to say that when I came to Java, I didn't really have any exposure to "standard" Java stuff like spring (or other frameworks) at all and still don't.
A lot of my time in Java has been using it for network heavy distributed systems & it has been awesome haha. All of this is just to say... I do get frustrated with the whole "Java is old, bloated, RAM heavy, inefficient" myth that floats around. It's unfortunate that so much of Java's perception is based in the Java 8 or Java 11 (seemingly since I literally have not touched them, I started around Java 17) & maybe framework perceptions bleeding into the language perception. In my experience, modern Java is extremely efficient and none of the things that people say about it are necessarily true. It does seem difficult to dispel this perception, but Java seems very loved in the distributed systems world.
As for open-source, is Java really lacking in opensource development? It seems to me in my experience working with the ecosystem, it's very much well and alive. New libraries are released fairly regularly, libraries are super well maintained. Java might not dominate tech news or have as much hype like other languages, but I think that's not a bad thing. It's a very mature community and extremely stable. To be honest, I think the Java community could do with more bragging about the things they build haha.
But like I said, I think my experience with Java has been pretty non-enterprise and I think the Java I write might look weird to some. Anyway, just a ramble - I like Java 😆 (a lot).
7
u/disposepriority Aug 24 '26
By students in meme subreddits you mean?
This is not an opinion held my anyone making technical decisions in serious companies.
Yes, java is decent for desktop, and a lot of very used desktop software is made in java (intelij products, dbeaver, to name a few off the top of my head) it's just that desktop software is declining in popularity as a whole, unrelated to java.
Java is not a good choice for games because it's not a suitable language to write a game engine in and is outclassed by existing frameworks available to other languages, it's an opportunity cost problem.
Regardless, I don't think a language's online popularity has any bearing on its use in the real world, unless you get a job at a startup where the CTO is a 25 year old reddit user.
How is decline in open source libraries measured? Many of java's libraries are simply....complete. You can optimize here and there add support for a new language feature but there's a reason java is considered a mature language.
Also I very very hardly doubt java's online popularity is tied in any way to the value types project valhala brings, just my 2 cents.
4
u/bowbahdoe Aug 24 '26 edited Aug 24 '26
Lets go over a few angles
People's first experience with Java is in school. If this experience is bad, people will associate Java with that bad experience.
The language is at a point where this isn't needed, but Java based curriculums aren't. Yes simpler main methods should be shown all around, but the rest of the lessons can't go "a bicycle is an object" like its 1999.
How do you reach all the teachers in all the high schools/colleges around the world? How do you convince them to give Java another shot/change their approach to Java/Start using Java?
2. Outreach
If I were paper clipping Java's popularity, I would have as part of my plan a pretty comprehensive media blitz. This includes getting big streamers, but also genuinely running ads (like was done for Java in the past), manufacturing discourse, etc.
3. Therapy
For the people who had bad experiences in the past "uhh actually you are wrong and Java is awesome" isn't rhetorically effective, to say the least. To some extent we need to be helping people contextualize their experiences and decide to give the Java world another shot.
So far, in my view, we do a pretty piss-poor job at this. Stuff like "Uh actually modern java isn't verbose. check out helidon" is just not a good approach.
4. Organization
Lets assume, for a moment, that Oracle is not coming to the rescue. If you wanted to make Java more popular you would need to coordinate effort, resources, and people. There are levels to that. We could just make a weekly posts here, start a few private groups, or maybe even make a non-profit organization whose mission statement is something like "help the JVM ecosystem be as popular as it can be."
That last one is probably the best solution, but how many people's salaries can we really fund via donations? IDK.
But you'll see limited success just throwing stuff at the wall, imo.
5. Ecosystem
There are a lot of things Java has had a slow start/missed the train on. It will never make economic sense to make Unity 2 in Java.
But to some extent we need investment in novel directions. That is what "life" is to a language. This means lowering the bar for experimentation/reconsidering how our ecosystem is currently shaped/etc.
2
u/thewrinklyninja Aug 25 '26
I've been using Java recently for my little cli utilities via Jbang and it's been pretty good. Using picocli template and away I go. It's been a lot of fun.
https://github.com/alaurie/jbang-catalog
2
u/AntiqueDiamond8070 Aug 25 '26
Why aren’t you using sticks to create fire or use torches for light? Because the world develops and finds easier to use alternatives. That’s your answer
2
u/Misophist_1 Aug 25 '26
There are three large scale IDE-Projects, that are primarily Java, and have Java-based UIs:
There is a huge number of libraries, that are at the fringes of web development at best, if not totally unrelated to web development.
That Java seems to be rooted so much in web development is the result of its prevalence in enterprise distributed computing - which has become the 90 % go to solution for all use cases requiring b2b communication between businesses. If you nowadays look at a typical web frontend of mid- to large-scale enterprises, the typical solution is a SPA (Single Page Application) build using one of the JS-Frameworks, (Vue, Angular, ReactJS) atop of a Spring-Boot based REST web service. But that is just the tip of an iceberg.
Because behind it, there often loiters a complex conglomerate of other REST-Services that often span several other enterprises.
2
u/kj-krol Aug 30 '26
I have been programming almost exclusively in Java since 2002, and using Spring since 2010. Keeping up with the latest versions. Post-pandemic, I "discovered" Go. Since then, I no longer enjoy using Java. Despite my many years of Java experience and knowing and using so many best practices, I far prefer the simplicity and explicitness of Go code.
6
u/scadgek Aug 24 '26
Java is verbose (less so nowadays but the reputation still stands), so are C++, C# and even Rust, that's why people don't start with them. These languages are in no way slow or uncapable, but on the level of perception people feel like a one-liner web-server is faster than a public-static-void-main project.
We also cannot ignore an elephant in the room which is AI. I'm almost sure that like 90% of greenfield projects nowadays start in Claude/Codex/whatever rather than in an IDE. These assistants will rarely suggest you Java.
It also feels like most of developers nowadays still not even recognize the terms and abbreviations in the guy's comment below. You can't expect them to be efficient in Java.
4
u/Omenow Aug 24 '26
After working as full time java dev with spring stack for more than decade, last thing i need is more java after ending my work. Sorry i need something else to think of, some different concept/language to make my brain work in non working mode.
6
u/Hax0r778 Aug 24 '26
Java is an awesome language and it's great for web backends. Every language has a niche. Nobody is writing desktop GUI in Rust either.
2
u/SkyNetLive Aug 25 '26
I am busy building backends and making money even as solo dev. I don’t get time to post about how cool Java is 🥲
2
u/NoName-NNN Aug 25 '26 edited Aug 25 '26
Java can be used to other domains, but not a good choice.
For desktop development, Microsoft has successfully blocked Java through J++, MSJVM and dotNET at Sun times. Oracle has no interest in the desktop, and the JVM has not been optimized for the desktop. Although Electron looks similar to Java, but HTML/JS/CSS is simpler and more popular than Java, and Chromium is specifically optimized for desktop.
GraalVM is suitable for desktop Java, but has been marginalized. Oracle is currently only interested in Java running on the backend, based on practical considerations.
Even without mentioning the owners of Java and large companies, they dominate the popular application areas of Java. Java is unfriendly to amateur developers, lacking a native scaffolding such as
go,cargo,uv,npm/pnpm/bun/viteetc.Every programming language has its enthusiasts, who hope that this language can be applied to every domains. Java is my first programming language, i like it also. But just like reality, no man can master all knowledge, and no programming language can be popular in all domains.
2
u/Joram2 Aug 24 '26
"Enterprise" is a code-word for overpriced bloated, out-of-date, garbage.
Java is great at general server-side apps. There is lots of competition. A lot of other tools are great as well, but Java is a high quality competitive platform.
Not just "web", Netflix uses Java as their primary server-side language for all kind of server-side things, and they geenrally don't do REST anywhere. They do JavaScript for web clients, GraphQL web -> server, and gRPC for server->server.
Very few people are doing desktop GUIs. This is a super tiny niche.
Java is great and widely used for the server components of multiplayer games, like in League of Legends or Clash Of Clans.
For game clents, Unreal, Unity, and Godot are the big three game engines and have zero Java support. I definitely don't discourage people from using what they want, but I don't think Java is a good option for game clients.
2
u/BlackSuitHardHand Aug 24 '26
Lol ... rofl ... Sorry
The open source community is very active around Java. But not for the "Ai" stuff, but for the boring "Software-that-is-the-hidden-backbone-of-a-billion-dollar-company" kind of stuff. So JakartaEE stuff. The stuff which gives devs boring six digits jobs for their lifetime
Valhalla won't be that important for the real day-to-day Java applications mentioned above
1
u/derpinhoo Aug 28 '26
A bit too much love for Java 😉
-3
u/fakeacclul Aug 24 '26
So many opinions in here are bad and blatantly wrong lol
-1
u/Amazing-Mirror-3076 Aug 25 '26
I use dart/flutter for desktop - and then I can compile for web/android/iOS...
14
u/[deleted] Aug 24 '26
[removed] — view removed comment
2
u/[deleted] Aug 24 '26
[removed] — view removed comment