r/java 8d ago

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

85 Upvotes

127 comments sorted by

51

u/hippydipster 8d ago

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.

6

u/robintegg 7d ago

Agreed. Java has a quality eco system on the desktop. https://awesome-java-ui.com/

9

u/RandomName8 7d ago

For desktop apps for machines with 32GB of ram, where you can only open like 4 apps at the same time... This isn't solely a java problem, but it annoys me that I used to use java on a 128MB of ram a long time ago, "ide" and all, and now it's impossible to get a graphical hello world in less than ~50MB after passing a big launch arguments soup.

12

u/hippydipster 7d ago

I make java apps that live in a couple hundred MBs without issue. And I make apps that use many GBs because they have huge in-memory databases. Your complaint here seems like a big exaggeration.

-3

u/RandomName8 7d ago

Yet you don't try to refute it, just dismiss as "not my problem". By the way, "a few hundred MBs", 12 is a few. Saying "a few" makes it sound like not much without actually providing any value nor necessarily being untrue, very witty.

Your remark on not taking much space here seems like downplaying it.

6

u/hippydipster 7d ago

Huh. Are you reading reddit from a different universe or something?

-1

u/RandomName8 6d ago

Oh? I was not informed nor I saw in the rules which "planet" was the right one. My apologies.

2

u/jonathancast 6d ago

12 is not "a few", especially not in the context of hundreds, lol. Also, I assume either the person you're replying to stealth-edited their post, or you're bad at reading, because the post I read that you replied to said "a couple" not "a few".

1

u/RandomName8 6d ago

because the post I read that you replied to said "a couple" not "a few"

indeed so.

3

u/VincentxH 6d ago

Skill issue

2

u/Neful34 7d ago

You are so outdated on the JVM world, I don't even know where to start...

0

u/RandomName8 6d ago

sure...

2

u/OddEstimate1627 2d ago edited 20h ago

I've built entire JavaFX GUIs that live in a ~12MB heap steady state.

1

u/gufranthakur 1d ago

please tell me how, mine take quite the ram (macOS)

1

u/RandomName8 1d ago

I imagine you're talking about heap usage and not the entire jvm process RSS.

1

u/OddEstimate1627 20h ago edited 18h ago

Clarified the comment. Yes, 12MB heap plus 8 MB newgen plus 3-5MB or so native memory. So about 25MB total depending on the resolution.

1

u/gufranthakur 3h ago

I am talking about what the Activity monitor shows (it's what the users will see) and since I am on a 4k hiDPI display, its quite high (around 300MB, 900MB at fullscreen)

turning off HiDPI via JVM arguements significantly reduces RAM but ofc everything looks very blurry and chopped

1

u/RandomName8 5m ago

I believe you might have replied to the wrong post (?).

22

u/I_am___The_Botman 8d ago edited 6d ago

I don't know where this negative impression of java is coming from, it's ridiculously popular and anything but slow these days.

8

u/21_Wrath 6d ago

The people making these posts are 20 year old kids who have never worked a real software job in their life.

34

u/Sea-Faithlessness-67 8d ago

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.

5

u/mishonis- 7d ago

True that. There's this Python project that is very popular and in every other job listing, and when you look under the hood, it's a shite project that is heavily promoted. Meanwhile the Java counterpart is an immensely capable and flexible library with great developer ergonomics but no one is talking about it because the team behind it doesn't churn out thousands of articles and tutorials to hype it up.

1

u/ihateclowns 7d ago

Which Python project are you referring to?

2

u/mishonis- 7d ago

Langchain/langraph. Spring AI does it much better IMO.

35

u/woj-tek 8d ago

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…)

7

u/robintegg 7d ago

Check out https://javaevolved.github.io/ for a modern well designed presentation of Java the language

4

u/woj-tek 7d ago

I know and love it but it's slightly different to what I propose :)

And it's not really "out there" easy to find :(

2

u/Neful34 4d ago

This is so cool :) I like how easy it is to see all changes.

1

u/koflerdavid 5d ago

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…)

Huh? That website actually exist and looks quite nice. It's just links to some other pages, but not bad at all otherwise. Did somebody get inspired by your comment or did you not check the URL before submitting?

2

u/woj-tek 5d ago

Did somebody get inspired by your comment or did you not check the URL before submitting?

Actually the third option - one again I re-read my message and got so annoyed to actually get the domain and quickly put there something along the lines of what I imagine it should be (it was a 15 minut "project" on impulse involving AI spitting out the page; I plan to re-work it to look better but in general it should stay like that conceptually - simple landing + the most relevant links do download and documentation :) )

1

u/woj-tek 8d ago

there is also openjdk.org which looks absolutely terrible…

In that vain I asked Claud to whip userCSS to make the openJDK website work better - especially on mobile and the result looks and works surprising well: https://userstyles.world/style/29825/jep-modern-reader (I was pondering submitting it to the subreddit but it's AI so against the rules, despite being usefull)

//cc: /u/nicolaiparlog -- I asked you a while back about OpenJDK looks and you pointed me to web-dev mailing list but in the end I bounced off of the wall… would it be possible to incorporate this CSS to the website so it would be available for everyone? Especially on mobile it makes reading JEPs… sane :D

2

u/davidalayachew 7d ago

In that vain I asked Claud to whip userCSS to make the openJDK website work better - especially on mobile and the result looks and works surprising well: https://userstyles.world/style/29825/jep-modern-reader (I was pondering submitting it to the subreddit but it's AI so against the rules, despite being usefull)

The url doesn't work.

2

u/woj-tek 7d ago

Weird, works for me.

Maybe the default https://userstyles.world/style/29825/ ?

1

u/davidalayachew 7d ago

That works, ty vm.

0

u/wildjokers 7d ago

It just centers it and makes it dark, how does that make it work better?

13

u/After_Dark 8d ago

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 8d ago

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 8d ago

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.

5

u/pjmlp 8d ago

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.

3

u/istarian 7d ago edited 7d ago

Unless you are using a native compiler, Kotlin is a 'JVM-hosted' language and fundamentally Java adjacent.

I think that Kotlin vs Java is probably a matter of personal taste in many respects.   Personally I much prefer explicit termination of statements over relying on whitespce and software just figuring it out.

2

u/genericallyloud 7d ago

In the context of Android architecture, there technically is no JVM. That might seem like splitting hairs since it is still fundamentally based on JVM bytecode, but it does get compiled to DEX bytecode during the building/packaging process. Targeting the JVM bytecode as input makes it easier to work across JVM languages, but it would certainly be possible to compile directly from Kotlin to DEX and bypass the JVM. If anything, the real dependency is to the JRE, which Android does still use.

2

u/pjmlp 6d ago

This is also a thing in certified JVMs like PTC, Aicas, IBM i, z/OS implementations.

Additionally, one of Kotlin selling points is the ability to consume Java ecosystem, pretty much useless without it, the proof being the alternative implementations are barely used at scale outside Android or Spring.

1

u/istarian 7d ago

It most definitely is splitting hairs given that you can, at least in principle, have a Java Virtual Machine (JVM) that wasn't developed by Sun Microsystems or Oracle.

I would consider the Dalvik VM to be functionally equivalent to having a JVM, especially if you compile Java or Kotlin first to JVM bytecode and then translated it to DVM (?) bytecode.

Google took a particular route to try and avoid being sued by Oracle/Java, but the end result probably wouldn't have existed if Java and the JVM didn't come first...

2

u/koflerdavid 5d ago

Dalvik VM

Modern Android versions don't use Dalvik anymore; only the DEX file format survives for packaging. Instead it is nowadays called the Android Runtime (ART, which is a very creative name, pun not intended) and apps are compiled ahead of time to native code for performance.

1

u/genericallyloud 6d ago

Well I mean, its a very practical choice to use JVM bytecode as the starting point, because then its a single target that works with all JVM languages. The fact that it gets recompiled to an entirely different bytecode optimized for android means the original bytecode wasn't really ideal. And at this point, removing support for the subset of JRE API's would be completely brutal for no reason. So they are quite literally locked in to the JVM bytecode for input and JRE-subset support for runtime. I think that's plenty to support it being Java adjacent forever.

However, since I was splitting hairs, I think its become more dependent on Kotlin than it ever was on Java. You can't even actually write modern Jetpack Compose components with Java - its Kotlin only. It very specifically leverages syntactic features of Kotlin that aren't in Java.

Especially under the context of the OP talking about JavaFX, Java for desktop, and Java based games, I think that pointing to Android is a little misleading and the hair splitting gets more meaningful. Mobile games are generally native code, not JVM at all. The bytecode is dex and runtime is ART (in many ways supporting the claims of performance issues for the JVM by building an entire alternative stack to make it work for mobile. no JavaFX or Swing code here), and finally, you can't even actually write a modern Android app in the latest first party UI framework using Java. (so at least the UI code is Kotlin)

So yeah, Android is definitely Java adjacent, and probably always will be. I don't know that it strongly counters the feeling that Java the language or JVM the runtime are a poor fit outside of web/enterprise. In many ways, it supports that claim by making dex and ART (which are tuned very differently than the JVM) and pushing the switch to Kotlin because Java + XML had a pretty bad rap for being clumsy and verbose.

18

u/BoundlessFail 8d ago edited 8d ago

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.

2

u/SkyNetLive 7d ago

Graalvm native has been in development for awhile, it seems it’s still being developed and IntelliJ directly supports it. But as of yet I have not come across a need for it at work

4

u/electrostat 5d ago

I played with graalvm native a while ago (like maybe 2-3 years ago). It didn't seem that worth it for us to try to use it because of reflection needing to be explicitly specified or something (and iirc, our usage of reflection was super tiny but still it'd be annoying).

are the main benefits supposed to be smaller binary & faster boot? i forget. but you lose JIT too, right?

5

u/ClammyHandedFreak 8d ago

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 8d ago

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. 

6

u/davidalayachew 7d ago

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"

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.

5

u/brokePlusPlusCoder 7d ago

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 7d ago

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.

3

u/znpy 7d ago

Is Java seeing a decline?

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.

3

u/OwnBreakfast1114 6d ago edited 5d ago

One thing i can say for sure is that Java development still is not as ergonomic as other languages.

Everything is ergonomic on local until you try to get reproducible builds and packaging for production. Python is literally the worst offender as it's not even obvious what a virtual env is or that you need one and don't get my started on how pip handles transitive dependencies (hint it sucks). At least uv is trying to solve some of the issues.

People keep trying to simplify build systems, but then they keep running into the issues that maven/gradle actually try and solve when you do something more complicated then packagemanager install dependency for your single project on local.

1

u/istarian 7d ago

Honestly, apache ant does a pretty good job with many basic tasks. It can just get kinda messy with more complex tasksstuff.

The biggest downside for a lot of people is that is that ant is CLI focused. Eclipse has some GUI capabilities, but it can take time to learn how to use it effectively.

Maven seems a little more approachable than Gradle, at least to me. I've found jt most useful for pulling in dependencies from a remote source during builds.

3

u/tofty82 6d ago

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 5d ago

(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).

3

u/kettle3 4d ago

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).

2

u/gufranthakur 4d ago

same. Developing any app or system in Java is just so… easy. No complex syntax features or fighting the compiler. You just write simple verbose code that is easy to read and write. IntelliJ makes it even easier

14

u/[deleted] 8d ago

[removed] — view removed comment

18

u/wolfanyd 8d ago

Massive enterprise base, but hardly the darling choice for new projects (outside of companies that were already Java shops)

You say this as if java shop companies are rare and enterprises aren't launching new java projects every day.

2

u/Omenow 8d ago

Everyday no, but every few months yes. I'm part of team where we make some smaller applications, mostly for backoffice. Sometimes we takeover projects and if it's worth rewrite it in our stack which is spring+react. So maybe nothing to big or to fancy but moving forward. Company is rather big but software is not it's product.

5

u/I_am___The_Botman 8d ago

I've worked in 3 major international companies and 2 startups in IoT and finance i the past few years and all of them run java on the backend. To give an idea of scale, one of the systems I worked with was processing 11k messages per second coming in from IoT devices all over the world.

12

u/i_wear_green_pants 8d ago

Nah. At least not for a long time. Java is very capable and easy to use. And the language keep getting better all the time. A lot of new projects still pick Java because it just works.

Java isn't going anywhere in a loooong time.

2

u/I_am___The_Botman 8d ago

I've no end of java work around my way, spring boot is everywhere! 😊 

13

u/766cf0ef-c5f9-4f4f 8d ago

Oracle is definetly NOT helping with this.

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.

6

u/disposepriority 8d ago

Java continues to have a negative reputation of being slow, boilerplate, RAM consuming memory hog.

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 8d ago edited 8d ago

I would genuinely like to know, what we as a community can do to make Java more "loved" and preferred

Lets go over a few angles

  1. Education

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?

  1. 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.

  1. 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.

  1. 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.

  1. 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 7d ago

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 7d ago

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 7d ago

There are three large scale IDE-Projects, that are primarily Java, and have Java-based UIs:

  • Eclipse
  • Netbeans
  • Intellij

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 2d ago

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 8d ago

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 8d ago

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.

1

u/hadrabap 7d ago

Same here. When I feel sad about contemporary software design, I mess around with Jakarta EE and MicroProfile. Yes, there are still secret corners where the world is still "normal". Next, I do all my private development in C++. Modern C++ (C++17 and up) is really nice. 🙂

7

u/Hax0r778 8d ago
  1. What matters most for game development is engines (unity/cryengine/unreal) and none of those are Java based. Not to mention being a non-optimal choice for something more real time anyway.
  2. For GUI it's many years behind. The UI looks clunky and is simply less expressive than something like electron. Not to mention all the frontend designers already know HTML/Javascript. Java is convenient for internal apps which only run on your machine and don't have to looked polished, but isn't a serious competitor for desktop applications.
  3. Data processing is primarily done by non-programmers (data scientists) who appear to prefer an easier language (python) even though Java is actually great at that.

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.

7

u/n3verwhere 8d ago

I'm honestly not sure that it makes sense to run a full browser (electron) embedded into a desktop app just so the UI can be developed with JavaScript / HTML. It is a waste of resources actually.

5

u/spigotface 8d ago

> Nobody is writing desktop GUI in Rust either

Not true. Look into Tauri.

2

u/clanker_lover2 7d ago

tauri uses web technologies for the frontend

2

u/SkyNetLive 7d ago

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 7d ago edited 7d ago

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/vite etc.

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.

1

u/trinReCoder 7d ago

but HTML/JS/CSS is simpler and more popular than Java,

I always wonder, is it not possible for someone to create a library or framework in Java (or any other language that's not JavaScript for that matter) that will read in html and css and convert that code into native desktop UIs. So no electron or webviews which are basically just web browsers.

I understand html and css specifications are massive, but it doesn't have to support everything. The things needed to create modern UIs would be enough, let's say grid, flexbox, positioning and anything else needed to create a simple UI.

1

u/NoName-NNN 6d ago

One approach is to support subsets of HTML/CSS and implement custom WEBVIEW, such as Sciter.

Another approach is to customize declarative UI and custom rendering engines, which are currently the mainstream solutions, such as Fyne (Go), Slint (Rust), Flutter (Dart), QML (C++) etc.

The second approach is modern and feasible for desktop Java. However, currently few people use Java to develop desktop applications or even write new UI libraries.

1

u/trinReCoder 6d ago

However, currently few people use Java to develop desktop applications or even write new UI libraries.

Yeah exactly! Because it's just dead in the space. Maybe if there was a nice modern ui library we would see more desktop apps created with Java.

1

u/OddEstimate1627 2d ago

I mean, have any of you looked into the current state? How many other frameworks look anywhere as polished out of the box as JavaFX with AtlantaFX?

Modern Sass/CSS themes,  great performance, hot reload of style and layout, and it's deployable on all 5 platforms.

GraalVM also just added G1 on Windows, so it's available on all Desktop platforms now.

I might be on the fanboy side, but a lot of the hate just seems uninformed or unwarranted.

2

u/Joram2 8d ago

Java currently shines at enterprise...

"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.

Take desktop development for example

Very few people are doing desktop GUIs. This is a super tiny niche.

Game Development is a bit weak, but we still have libGDX and LWJGL

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.

3

u/trinReCoder 7d ago

Unreal, Unity, and Godot are the big three game engines and have zero Java support

Godot is working on bringing kotlin/java support right now LINK.

1

u/istarian 7d ago

Enteprise is also synonymous with a class of problems that rarely crop up for small applications that run locally on a single machine and get terminated when the user is finished doing something with them.

2

u/Mystical_Whoosing 8d ago

sorry, JavaFX is not that good. I implemented recently the same app (obsidian md clone really but with some extra features I like), with a standard vuejs frontend stack + electron, and also with JavaFX (+ gluonfx, + native compilation). The java app wasn't better, didn't use less CPU, didn't use less memory, in exchange it was a bit clunky.

I was really hoping that it performs better, because it is ridiculous that every single UI needs to have a javascript engine inside; and I much prefer having only a few dependencies I can oversee. But unfortunately JavaFX is just not there for me.

3

u/ConfidenceUnique7377 7d ago

Yep ... switched from JavaFx to "old" Swing.

Because a lot of stuff.

1

u/Snoo23482 4d ago

For desktop apps, Delphi and C++ Builder are still giving the best results. Unfortunately there doesn't see to be a whole lot of new blood choosing those technolgies.

3

u/BlackSuitHardHand 8d ago

  Java continues to have a negative reputation of being slow, boilerplate, RAM consuming memory hog

  JavaScript, [...], python, [..]. These languages are often considered first options for any Greenfield projects. 

Lol ... rofl ... Sorry

  The open source communities in these languages are very active, you will see some amazing work being put out by the community.

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

Perhaps project Valhalla could help, but I wonder how much would it help restore Java's PR. Oracle is definetly NOT helping with this.

Valhalla  won't be that important for the real day-to-day Java applications mentioned above

3

u/repeating_bears 8d ago

The open source community is very active around Java

Eh, not really. At the moment I use TypeScript, Rust and Java, and anecdotally I'd say Java is the least active of the 3.

4

u/AccidentSalt5005 8d ago

its kind of sad really idk if its because im old, atleast its active in minecraft modding community.

3

u/BlackSuitHardHand 8d ago

As a user of all of these: They look more active,  but the general maturity of the libraries is far worse. While Java has established standards for many things (especially Spring / JEE) Rust and Typescript still have the hot-new-framework-of-the-week  problem - and most of them dying before you finish your project build upon them

2

u/repeating_bears 8d ago

Java is more mature but it has a near-20-year headstart on Rust so that's not surprising. I wasn't making a claim about maturity, only activity.

Java had a lot of activity at one point which produced mature libraries, but now there isn't so much.

1

u/davidalayachew 7d ago

Java had a lot of activity at one point which produced mature libraries, but now there isn't so much.

Couldn't that mostly be explained by many of those libraries already being built?

1

u/repeating_bears 7d ago

No because it's not like we've run out of things to be built. That's not possible with software libraries - there's always room for innovation

2

u/davidalayachew 7d ago

Sure, I get that. But that's my point -- slowed activity is usually in response to a lot of the new stuff having already been made, and now they are in maintenance/incremental-feature mode. Which is not a bad thing, but I also wouldn't call that not much activity.

My larger point is that, it takes way more time to make 10% progress if you are 90% done vs 10% done. So, a new/young ecosystem will simply have more "activity" or "progress" by nature of being younger.

1

u/repeating_bears 7d ago

slowed activity is usually in response to a lot of the new stuff having already been made

This is framing an opinion as fact. There are many reasons that activity might be lower and you don't have any evidence to say that's "usually" the reason.

Another reason is that that generally I'd say Java devs skew older than TS or Rust devs, and older devs are more likely to have families and other commitments which make contributing to open source less of a priority.

It's not like there's a million Java devs sitting around going "I'd love to contribute to open source, but everything's been made!"

There could be a better build system than Maven if someone wanted to make it. There could be a better JSON library than Jackson (or any of the others).

I agree that a young ecosystem will make more progress but we're not talking about progress. We're talking about activity: number of developers working, number of projects, volume of commits, size of those changes.

1

u/davidalayachew 7d ago

This is framing an opinion as fact.

Ok, that wasn't my intention. I just thought it was the more likely outcome.

Another reason is that that generally I'd say Java devs skew older than TS or Rust devs

If you're saying experienced devs, then yeah, I can agree with that.

There could be a better build system than Maven if someone wanted to make it. There could be a better JSON library than Jackson (or any of the others).

Tbf, can you think of a build system that is both better and more flexible than Maven? You can talk ergonomics, like Cargo, but the build times are atrocious. And Jackson is pretty good compared to most out there.

Or am I wrong and these could/should be way better, in comparison to other ecosystems?

1

u/repeating_bears 7d ago

Maven and Jackson are both good enough, but they're not insurmountably good.

Cargo is slow by nature of the Rust language, rather than because it's badly designed. I think the design is a big improvement on Maven. Lockfiles, toolchain management, TOML instead of XML (and IMO a better "model"), a more functional CLI

→ More replies (0)

-5

u/AcridWings_11465 8d ago

Typescript might have that problem, but Rust backend has settled on actix and axum

4

u/BlackSuitHardHand 8d ago

I am still waiting for the rust equivalent of JDBC.

1

u/AcridWings_11465 6d ago

I'm not surprised, given that Rust is only ten years old since 1.0, and Java is thirty.

1

u/derpinhoo 4d ago

A bit too much love for Java 😉

-3

u/fakeacclul 8d ago

So many opinions in here are bad and blatantly wrong lol

3

u/davidalayachew 7d ago

So many opinions in here are bad and blatantly wrong lol

Any examples?

2

u/fakeacclul 4d ago

“Java is the new cobol”

“JavaFX is worse than electron”

1

u/davidalayachew 4d ago

Oh, well I agree with you about the Electron one at least. Granted, Electron has access to the whole JS library, so maybe that is where they are coming from.

-1

u/Amazing-Mirror-3076 7d ago

I use dart/flutter for desktop - and then I can compile for web/android/iOS...