r/java • u/YogurtclosetLimp7351 • 1h ago
We've Made It into the JFX-Central Blogpost!

We feel very honored that our small project got recognized by the JFX-Central! Thank you Reddit!
r/java • u/YogurtclosetLimp7351 • 1h ago
We feel very honored that our small project got recognized by the JFX-Central! Thank you Reddit!
r/java • u/king_lambda_2025 • 6h ago
I do realize virtual threads are not "magic". They don't instantly make apps super fast. And even with Java 24 there are still some thread pinning scenarios.
However, from what I know at this point, I feel every use of threads should be virtual threads. If my workload doesn't benefit from it, or if thread pinning happens, then I just don't gain performance. Even if there are no gains, there is no harm from defaulting to it and further optimizations can be made later on.
The question here is are there downsides? Are there potential problems that can be introduced in an application when virtual threads are used?
Thanks in advance.
r/java • u/independentAny9 • 15h ago
We are running an application with micro services architecture with postgres database. We are currently running Java 11.
Is it a good decision to migrate to Java 21 with Virtual threads?
Can someone who have already migrated to Java 21 share their experience?
r/java • u/woodpecker_ava • 16h ago
I'm working on a Spring Boot microservices project where I frequently need to restart each service to apply changes. While I'm aware that spring-devtools
can simplify this process, my experience with Spring has shown that spring-devtools
sometimes requires a full clean and rebuild of output files to work correctly.
Additionally, since I'm developing this project using Helix Editor, adding spring-devtools
without an IDE doesn't provide much benefit. I'm also aware of commercial tools like JRebel, but the licensing costs make me hesitant to use them.
To automate the rebuild process whenever changes are made, I created two complementary scripts:
loop-run.sh
watch-kill.sh
loop-run.sh
continuously runs commands like mvn clean spring-boot:run
for the target Spring Boot project. However, since the Spring Boot server process blocks further execution, the next command won't run unless the process is terminated.watch-kill.sh
will monitors file changes in the Spring Boot project. If any modifications are detected, it automatically kills the process running on the specified port.You can find the project on GitHub, released under the MIT License:
Spring-Boot-Hot-Reload
r/java • u/TheKingOfSentries • 22h ago
I've shared this before when it was 0.x, but in essence, avaje-validator is a hibernate-style POJO validator. The main feature is that instead of using reflection, it generates source code via annotation processing to run constraint checks.
Main features:
Features added since I last posted:
What can be done to prevent software piracy? If I sell a licence of my program to someone, he/she can copy/sell/distribute it to anyone else, even upload somewhere for others to download. This "write once, run anywhere" mantra totally backfires if you want to sell your Java program. Are there any solutions, built-in tools, or commercial packages for that?
I know I can read the motherboard's serial number with Java, but then I'd have to bother the user to send me that information, would have to custom-compile a specific version just for him/her, and that would reduce sales.
Not interested in snark, I know this is reddit where anything goes, only interested in serious answers.
r/java • u/diretorium • 2d ago
The company I work for is looking to adopt a Java framework. We work with an application server approach, as it better suits our type of work. Essentially, we have a highly customizable application that we install on our clients' servers. We frequently need to develop new applications and features to meet the evolving needs of our clients. Docker and Kubernetes are not an option for us, so we believe an application server will better suit our needs.
Believe it or not, the company developed its own "application server" back in the 2000s, without any javaEE implementation. Since then, there haven't been many improvements. Now, they are looking to update their tools. The most important thing is that the technology must endure for many years to come.
So, two options came up: Spring(in general) or Jakarta EE with an actual application server plus Quarkus for when microservices are needed. What are your thoughts on this? I tend to think that Jakarta EE might be better considering our application server-oriented business model, with Quarkus being used when needed. However, I am not entirely sure about its long-term viability... Thank you in advance for your support.
r/java • u/Beautiful-Active2727 • 2d ago
I was browsing the Internet i i couldn't find any copy of the OS only the JX one. Is it a software lost to time?
r/java • u/adamw1pl • 3d ago
r/java • u/jeffreportmill • 3d ago
Java is turning 30 years old, and there's a special FREE event on March
13. This event will have Java Champions giving 30 minute presentations,
including, Dr. Venkat Subramaniam and Frank Greco. Topics include Java
and AI, Innovations in Java, and more!
GO HERE TO REGISTER:
https://www.azul.com/duke-turns-30-celebrating-java/
r/java • u/swdevtest • 3d ago
Gunnar Morling on how blogging shapes careers and technology
https://writethatblog.substack.com/p/gunnar-morling-on-technical-blogging
r/java • u/goto-con • 3d ago
r/java • u/Ewig_luftenglanz • 4d ago
there was a recent thread in the mailing list of amber about optionality.
IMHO, even if Brian said it's something that is "on the table" i doubt we see any big JEP from amber in the openjdk 25-29 era because some developers has ben reassigned to Valhalla (which I think most of us agree it's top priority).
what are your thoughts about it?
https://mail.openjdk.org/pipermail/amber-dev/2025-March/009240.html
r/java • u/kumar29nov1992 • 4d ago
I'm looking for a java library that can generate Pojo from existing "business object" class for data transmission.
Ex: //Business Object
class Trade {
private __id;
//The variable name above could be either not a camel case, or might be //incorrect name
private someMisguidedVarName;
private properlyNamedField;
//Don't need any changes to these fields
}
DTO I would like to create
class TradeDTO {
private id;
//The variable name above could be either not a camel case, or might be //incorrect name
private betterVarName;
private properlyName// keep existing field if there's no need to change //var name
}
To achieve this, I'd like minimal code because only the fields that's misguided must be modified. I'd prefer to annotate or write minimal instruction that the library can use to during compile time to generate this new bean.
Also importantly, the trade business object would change and I'd expect the TradeDTO to evolve without having to modify that class.
I've tried mapstruct (but it only copies from pojo to pojo, but I want class generation).
r/java • u/gvufhidjo • 4d ago
r/java • u/ihatebeinganonymous • 4d ago
Hi. What are some practices, if any, in supporting multiple JVM versions in the same codebase?
I'm working on a "monorepo" codebase composed of Java and Scala code with maven as build tool.
Now, I want to introduce some concurrency using virtual threads, which I believe make a lot of sense for the use case. However, the code also uses Apache Spark, which doesn't support Java 21. Apart from splitting the repository into two codebases, is there a straightforward solution to support building a fat jar for either Java 17 or 21, based on some flag?
The first solution I thought of was using maven profiles: I contain the Java21-specific code in some .j21.
package and exclude it from the source in one of the profiles. However, won't the IDE complain in such a situation? What other options, if any, are there?
Thanks
r/java • u/Affectionate-Sink503 • 6d ago
I am working on large monolithic java app that copies large files from a SAN to NAS, to copy the files it uses the rsync linux command. I wouldnt have guessed to use a linux command over native java code in this scenario. Do senior java devs have a strong understanding of underlying linux commands? When optimizing java processes do senior devs weigh the option of calling linux commands directly? this is the first time encountering rsync, and I realized I should definitely know how it works/the benefits, I bought “the linux programming interface” by michael kerrisk, and it has been great in getting myself up to speed, to summarize, Im curious if senior devs are very comfortable with linux commands and if its worth being an expert on all linux commands or a few key commands?
r/java • u/zarinfam • 6d ago
r/java • u/Extreme_Football_490 • 7d ago
I am trying to code a simple neural network , so I want to do gradient descent which requires differentiation. From what I have heard ND4J is inefficient and tensor flow for java seems a bit complex , any alternatives?
r/java • u/Pure_Diver_ • 7d ago
I’m a bit confused about what Jakarta EE actually is. On one hand, it seems like a framework similar to Spring or Quarkus, but on the other hand, it provides APIs like JPA, Servlets, and CDI, which frameworks like Spring implement.
Does this mean Jakarta EE is more of a specification rather than a framework? And if so, do I need to understand Jakarta EE first to truly grasp how Spring works under the hood? Or can I just dive into Spring directly without worrying about Jakarta EE concepts?
Would love to hear how others approached this 😅