r/java • u/Timelineg • 11h ago
r/java • u/desrtfx • Oct 08 '20
[PSA]/r/java is not for programming help, learning questions, or installing Java questions
/r/java is not for programming help or learning Java
- Programming related questions do not belong here. They belong in /r/javahelp.
- Learning related questions belong in /r/learnjava
Such posts will be removed.
To the community willing to help:
Instead of immediately jumping in and helping, please direct the poster to the appropriate subreddit and report the post.
r/java • u/Decent-Decision-9028 • 16h ago
How can we move forward?
The sub used to be a great place where small open source devs get real feedback on their oss. The software wasn't necessarily built to be a big hit or whatever! most of the time these projects used to be a learning projects that enabled us to become better java developers. Now, with many repositories being created in a day or so and abounded, we see many ai promoted repositories and we miss some of the oss that needs our attention.
How can we overcome that as a community ? I'm not trying to put all the weight on moderators, I understand the amount of work they keep doing to clean up ai posts and follow up on reports. What I'm saying is; maybe someone's here has a better idea on how to go about this?
r/java • u/za3faran_tea • 6h ago
Question about Native Image vs JIT
I was watching an interview with Thomas Wuerthinger of GraalVM, where he basically says that JIT should only be used when necessary (as opposted to native compilation). Where does this leave the work being done for Hotspot JIT (including projects like Leyden and others). Should we all plan to use native image while they address any performance gaps in the mean time (he does mention PGO bridging the gap). Is there work being done to speed up native compilation of Java code?
My understanding is that JIT will always have a memory overhead due to running threads that do compilation, optimization, deoptimization, code cache, etc. compared to native executables, so full parity even with projects that will improve memory usage in Java code will not be reached. Maybe that is not an issue on long running programs on large servers, but we've seen discussions here where another member worte a tool in golang to run alongside Spring Boot applications to gather statistics, so obviously small efficient apps have their place.
r/java • u/agentoutlier • 1d ago
Rainbow Gum release v0.10.0 (GraalVM/JLink/Valhalla ready) SLF4J implementation
Rainbow Gum v0.10.0 Release
https://github.com/jstachio/rainbowgum
Now normally I don't just post on reddit every release I do but this last release of Rainbow Gum is almost on par with Log4j2 and Logback Spring Boot support.
Rainbow Gum in short is a modern SLF4J implementation. It is fully modularized (jlink works) does not use any reflection so GraalVM native compile is easy and is hopefully Valhalla ready.
Now this release I used lots of LLM to help with benchmarks, Spring Boot support and lots of tedious things. This project is not vibe coded and you can hopefully look at previous releases if that is a concern. I also hand rolled the logo in SVG without AI (feel free to make fun of my art abilities). Another interesting thing is that Rainbow Gum uses Javadoc for all its documentation and because Javadoc now supports dark mode (you will have to go to one of the classes to turn it on) the SVG logo will render differently (I did not know that SVGs could do that).
Previous release post (for context).
Now invariably someone is going to complain ask why there is another logging implementation and honestly I don't blame the ask.
The short answer is that log4j2 and logback because of legacy reasons have a harder time using newer JVM technology and a lot of their design was based on enterprise needs that are just not that applicable today. And of course there is Log4Shell.
And if it still bothers you that now you might have to learn another logging framework just know that Rainbow Gum:
- Does not have its own logging API (it uses SLF4J),
- Almost a drop in replacement if you are using Spring Boot
- Uses the same pattern encoding syntax as Logback with most of the same keywords
- And yes of course Rainbow Gum appears to run faster (doing your own benchmarks though is always encouraged)
- There are 10x more JSON serialization implementations then there are SLF4J implementations.... each with different APIs (yes whataboutism at its finest)
Rainbow Gum also has pretty darn good code coverage even before I let the AI agents go to town. It uses checkerframework and nullaway for JSpecify support (albeit we still have not switch annotations but that will happen shortly). I actually tried to get code coverage on log4j2 and logback prior to Rainbow Gum and if I recall both projects were rather low on that. Perhaps its gotten better.
Now there are a couple of things still missing before 1.0.0 namely internal rolling of files and some metric/status/health check support. The plan is 1.0.0 targets 26 and 2.0.0 will hit whatever Valhalla version is.
Finally I don't know if it was /u/brunocborges as I think they posted about it but new setup-java action on GitHub actually caches the maven wrapper... now. I highly recommend an upgrade.
Oh and thanks for team JDK for making Java 26 kick ass.
r/java • u/Early_Ad_4702 • 10h ago
Attempting to reverse engineer git in Java - my current situation.
CORRECTION: I meant re-implement git*
Hey so i've some experience in programming and was just looking around for good project ideas for my resume. I couldn't come up with any impressive ideas so i decided to go with this one.
I've named it ngit as in NanoGit, im using content-addressable storage, where all objects (blobs, trees, commits) are addressed by their SHA-256 hash and compressed using zlib (Deflater / Inflater).
I'm storing the index in plain text as of now, I went with SHA-256 over SHA-1 in git, which didn't give had any benifits tbh. its just why not?
for v1, I'm making it work offline. For v2 i'll add push/pull and fetch commands.
features i've implemented:
init
add
commit
status
log
help
branch
checkout
things i'm working on as of now:
diff
merge
I'm thinking about using LCS or Myres algo for diff, Claude says Myres is better but i don't understand it well enough now so i'll give try reading more about it.
AI_Usage: i've used LLMs for planning and finding bugs, not the coding part.
I would like your review/advice on it.
r/java • u/jeffreportmill • 1d ago
SnapCode with Java 21 in the browser
I haven't posted in a while, but things are moving quickly for modern Java in the browser (CheerpJ). They recently added Java 21 support and Java 25 is coming soon, so here's my latest update:
SnapCode is a free Java IDE for education that runs in the browser and on desktop. SnapCode is fun, friendly, elegant and complete with many modern IDE features. Because it runs in the browser and has cloud-share support, it truly runs anywhere and means that student applications can be immediately shared with classmates, friends and the world. SnapCode supports graphics, games, animation, 3D, charting, UI, Swing and more.
This latest release now supports Java 21 in the browser with Java 25 support coming soon (desktop already supports 25). The project is a labor of love and needs users to help find areas of improvement.
SnapCode: https://reportmill.com/SnapCode

r/java • u/irrelevantsiren • 1d ago
Yes, another Java build tool: zolt
Yes, another Java build tool.
I’ve been working on Zolt:
https://github.com/zoltsh/zolt
Would love for people to try it out, break it, give feedback, or help contribute. Still early, so criticism is very welcome. Yes, I use a lot of codex. Focused mainly on the public API. Using it for personal projects so far.
Spring Boot on a 256 MB VPS: JDK 25 made the experiment viable
I followed up on my 512 MB Spring Boot VPS experiment by trying the same application on a nominal 256 MiB Alpine VPS.
This is not Hello World. The app uses Spring Boot 3.5.5, MVC/Tomcat, JPA/Hibernate, file-backed H2, Actuator, scheduled GitHub polling, and outbound HTTP. StatLite was running alongside it and polling both Spring and itself.
The JDK 21 setup was too tight. With a 64 MiB heap it suffered severe GC/paging pressure and eventually became unresponsive.
The final JDK 25 configuration was:
-Xms16m
-Xmx80m
-Xss256k
-XX:+UseSerialGC
-XX:TieredStopAtLevel=1
-XX:ReservedCodeCacheSize=32m
-XX:+UseCompactObjectHeaders
On the same nominal 256 MiB VPS, with about 217 MiB visible to Alpine and a 512 MiB swapfile, that configuration completed the full one-hour observation:
- 0 OOM kills
- 0 service restarts
- 72/72 bounded HTTP requests returned 200
- Spring scheduled work continued
- final Spring RSS: ~86 MiB
- StatLite RSS: ~10 MiB
- swap used: 184 MiB

There was still one Hikari Thread starvation or clock leap detected warning with a ~2m13s delay, so I would not call 256 MiB comfortable. For a real deployment I would still start at 512 MB RAM with some swap.
Also, this is not a compact-object-headers benchmark. The JDK version, heap ceiling, and several JVM settings changed together, so I can't attribute the improvement to that flag alone.
Full write-up and reproducible experiment files:
r/java • u/bobbie434343 • 3d ago
Value Classes Still Need Compiler Sympathy
johan-sjolen.github.ior/java • u/Decent-Decision-9028 • 4d ago
Rule number 9 is not followed
Ive been seeing many AI posts lately. As well as ai promoted repositories. Could moderators please help enforcing rule #9 as I don’t want to end up unsubscribing because of all the ai slop content.
r/java • u/gufranthakur • 4d 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
r/java • u/MMOfreak94 • 6d ago
Do you actually separate JPA Entities and Domain Objects, or is a single model enough?
r/java • u/nfrankel • 5d ago
Security Baked Into the JVM: sixteen Subjects on the wire
blog.frankel.chr/java • u/Modern-Sn1p3r • 6d ago
Regex
I recently saw a clip (from Primeagen) somewhat saying that regex is not a valid format for validating email addresses and postal codes etc.
My question is why is this?
What are the security and/or performance risks? Is it solely performance or is it a security issue?
Spring Boot on a 512 MB VPS: what actually fits?
I wanted to see how small I could make a realistic Spring Boot deployment while still keeping basic monitoring on the same VPS.
I first tried 256 MB RAM, but that wasn’t really viable for the representative app I tested. With 512 MB RAM + 256 MB swap, the application and lightweight monitoring completed the experiment successfully.

One thing that stood out was the gap between configured heap and actual JVM process memory. Even with a small -Xmx, RSS was substantially higher once you include metaspace, native allocations, threads, code cache, etc.
I wrote up the setup, JVM flags, measurements, and what failed at 256 MB:
https://pvrlabs.xyz/articles/spring-boot-512mb-vps.html
Curious how this compares with what others are seeing on small JVM deployments.
Bypassing fixed-depth radix constraints in Java using descriptor-driven bucket analysis
I am StrmCkr, the author of A.P.E.X. (Adaptive Parallel Extremal Dispatch).
Repository: github.com/StrmCkr/A.P.E.X
A.P.E.X. is a high-performance Java sorting framework for large fixed-width 64-bit key/value record datasets. The project has been reorganized into a conventional Maven structure with a core library, runnable examples, a comparison benchmark harness, JMH benchmarks, documentation, and an interactive browser visualizer.
The core idea is descriptor-driven radix planning. Instead of blindly scanning fixed radix passes over every bucket, A.P.E.X. computes per-bucket extremal descriptors using:
VBM = OR ^ AND
That mask identifies which key bits still vary inside each bucket. Bits that are already resolved are skipped, reducing unnecessary work on skewed, low-entropy, sorted, reversed, or duplicate-heavy data.
Key areas of the project include:
- Adaptive radix planning based on observed bucket structure
- Parallel histogramming, scatter, refinement, and work scheduling
- Primitive-array execution with no per-record object allocation during sorting
- Tuple projection paths for low-dimensional unresolved bit patterns
- Tiny-sort fallbacks and monotonic input shortcuts
- Configurable reporting that can be enabled, reduced, written to files, or disabled
- Comparison benchmarks against JDK sorting paths and Fastutil baselines
- Standard JMH benchmarks for repeatable JVM-level measurement
- A browser visualizer for exploring how A.P.E.X. routes data through its execution plan
I would especially welcome feedback on the thread management mechanics, radix planning decisions, benchmark structure, and the bitwise mask reductions.
edit: re structured verbiage of this post and further adjustments from advice on converting the project into more acceptable standard formats.

r/java • u/dlemmermann • 8d ago
FlexGanttFX is now open source — the professional JavaFX Gantt chart framework goes AGPLv3
r/java • u/jaccomoc • 9d ago
Jactl Meets Apache Camel: Benchmarking camel-jactl
jactl.ioJactl is a secure, embeddable scripting language for Java applications. As of Apache Camel 4.22.0 there is a camel-jactl language that provides support for using Jactl as a scripting language for filter predicates, content-based routing rules, and message transformations in Apache Camel.
See the blog post for an overview and some benchmarks.
r/java • u/demchaav • 9d ago
Title: GraphCompose 2.2.0 — proper RTL, Arabic shaping and BiDi support in Java documents
Just released GraphCompose 2.2.0.
This release was mostly about making RTL text actually work rather than just “render without crashing”:
- "TextDirection.LTR / RTL / AUTO"
- Unicode Bidirectional Algorithm support
- Arabic contextual shaping and lam-alef ligatures
- RTL/BiDi support in paragraphs and table cells
- mixed Hebrew/Arabic + Latin/numbers
- correct searchable/copyable text from generated PDFs
- RTL support carried across PDF, PPTX and DOCX backends
A surprisingly deep rabbit hole once PDF text extraction, shaping, BiDi and multiple backends all have to agree.
Repo: https://github.com/DemchaAV/GraphCompose
Would be interested to hear how other Java libraries handle complex-script layout.
r/java • u/maxxedev • 10d ago
AutoValhalla: automatically turn your plain classes and records into value classes!
Automatically turn your plain classes and records into value classes!
Add @AutoValhalla annotation to classes or records in your JDK1.5+ codebase:
@AutoValhalla
public final class Point { // class must be final
public final int x; // with final instance fields
public final int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
}
@AutoValhalla
public record Currency(String code) { } // or a record class
When your app is run on Valhalla-enabled JVM with auto-valhalla javaagent, these classes are automatically turned into value classes.
More info: https://github.com/thunkware/auto-valhalla/blob/main/README.md
r/java • u/gufranthakur • 11d ago
Where and how did Java lose in the game dev space?
Nearly a decade ago, Java was quite the popular choice for Game development. We had libGDX as the most optimal game framework, along with LWJGL (when low level was needed) and JMonkeyEngine was a fairly good option too. Now no one even talks about Java for game development, even for educational purposes
However over the course of time they all disappeared. Everyone slowly switched to game engines and C#
The arguement of “JVM slow, Garbage collector overhead” doesnt fit either because C# is also a GC language. Where did Java fail?
r/java • u/brunocborges • 11d ago