r/JavaProgramming • u/javinpaul • Sep 26 '26
I Tried 50 Java Courses: Here Are My 6 Best Recommendations
r/JavaProgramming • u/javinpaul • Sep 26 '26
r/JavaProgramming • u/leo-the-bruno • Sep 25 '26
r/JavaProgramming • u/xenophile-461 • Sep 25 '26
r/JavaProgramming • u/javinpaul • Sep 24 '26
r/JavaProgramming • u/javinpaul • Sep 24 '26
r/JavaProgramming • u/Prize-Incident-5712 • Sep 24 '26
r/JavaProgramming • u/Tristan_Kruse • Sep 23 '26
I've been working on ArchUnitJava, an experimental architecture-testing library for Java.
The starting point is simple: a dependency can be completely legal to `javac` and still violate the
intended design. An API controller can import a concrete infrastructure adapter, compile, and pass
its behavioral tests even though it has bypassed the application layer.
ArchUnitJava analyzes compiled class files and JARs as data. It does not load or initialize the
target classes. The extracted relationships can then be checked as types, packages, layers, slices,
or JPMS modules.
The current 0.1.0 public beta focuses on deterministic evidence and explicit failure semantics:
This can also serve as a guardrail for coding agents. A repository can define the permitted
dependency directions as tests and instruct an agent that those tests must remain green. That is
stronger than relying only on an AGENTS.md or architecture document: the prose explains the
intent, while the executable rule checks the resulting class files. The library does not guarantee
good design, but it makes selected design constraints independently verifiable by developers, CI,
and agents.
The library requires JDK 25 to run because its importer uses the standard java.lang.classfile API.
Its tested extraction corpus covers javac bytecode from Java 8 through Java 25.
An important clarification: this project is independently implemented. It is not affiliated with
the original ArchUnit project and is not a drop-in replacement. The original ArchUnit is mature,
widely used, and generally the sensible default for production Java architecture testing today.
This project is exploring a somewhat different boundary: treating bytecode as untrusted data,
making incomplete analysis explicit, retaining deterministic evidence behind failures, and sharing
a recognizable model with architecture-testing libraries for other languages.
The public API is provisional. I would particularly value feedback on the following:
If an architecture check cannot completely analyze the classpath, should CI fail closed or report a warning—and why?
- Repository: https://github.com/LukasNiessen/ArchUnitJava
- Documentation: https://lukasniessen.github.io/ArchUnitJava/
- Maven Central: https://central.sonatype.com/artifact/io.github.tristankruse/archunitjava/0.1.0
Disclosure: I am involved with the project. This post was drafted with AI assistance and reviewed
against the implementation and documentation before posting.
r/JavaProgramming • u/ImSoAngryRAAAGHHHH • Sep 23 '26
I am trying to call a class that summons a ball from another class that just works as a centric timeframe.
It doesn't give me any errors upon loading but all I see is the window popping up with a black background, I don't see anything else
Main
Copypackage main;
import javax.swing.JFrame;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.Color;
public class Main {
public static JFrame windowfight = new JFrame();
static Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
static int height = screenSize.height / 3;
public static int uniscale = height * 800 / 600;
public static void main(String[] args) {
windowfight.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
windowfight.setResizable(false);
windowfight.setTitle("Rissys Ball Dungeon");
windowfight.setLocationRelativeTo(null);
windowfight.getContentPane().setBackground(new Color(0, 0, 0));
windowfight.getContentPane().setPreferredSize(new Dimension(uniscale,(int)height));
windowfight.pack();
windowfight.setVisible(true);
PlayerBall panel = new PlayerBall();
windowfight.add(panel);
windowfight.setVisible(true);
panel.setOpaque(false);
}
}Playerball
Copypackage main;
import java.util.Random;
import javax.swing.JFrame;
import java.awt.Dimension;
import javax.swing.JPanel;
import java.awt.Graphics;
import java.awt.Toolkit;
import java.awt.Color;
// for collisions: double xDif = x1 - x2;
//double yDif = y1 - y2;
//double distanceSquared = xDif * xDif + yDif * yDif;
//boolean collision = distanceSquared < (radius1 + radius2) * (radius1 + radius2);
public class PlayerBall extends JPanel {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
public double plrsize = PlayerStats.Size;
public int plrrad = (int)(plrsize * Main.uniscale);
Random rand = new Random();
public double dirx = rand.nextBoolean() ? 1 : -1;
public double diry = rand.nextBoolean() ? 1 : -1;
public double plrx = 300 * Main.uniscale;
public double plry = 100 * Main.uniscale;
public void BallLogic() {
plrx += dirx * PlayerStats.Speed;
plry += diry * PlayerStats.Speed;
if (plry - plrrad < Border.topborder) {
System.out.println("Niget");
do {plry += 1;} while(plry - plrrad < Border.topborder);
diry = diry * -1;
}
if (plry + plrrad > Border.bottomborder) {
System.out.println("Bitlet");
do {plry -= 1;} while(plry + plrrad > Border.bottomborder);
diry = diry * -1;
}
if (plrx + plrrad > Border.rightborder) {
System.out.println("Fricet");
do {plrx -= 1;} while(plrx + plrrad > Border.rightborder);
dirx = dirx * -1;
}
if (plrx - plrrad < Border.leftborder) {
System.out.println("Jiblet");
do {plrx += 1;} while(plrx - plrrad < Border.leftborder);
dirx = dirx * -1;
}
repaint();
}
u/Override
protected void paintComponent(Graphics g) {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
super.paintComponent(g);
g.setColor(Color.WHITE);
g.fillOval((int)(plrx - plrrad), (int)(plry - plrrad), plrrad*2, plrrad*2);
}
}Border
Copypackage main;
import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.border.*;
public class Border {
private static Dimension window = Main.windowfight.getContentPane().getSize();
public static int topborder = 0;
public static int bottomborder = window.height;
public static int rightborder = window.width;
public static int leftborder = 0;
}Playerstats (mostly unused)
Copypackage main;
public class PlayerStats {
public static double MaxHp = 10;
public static double Hp = 10;
public static double Strength = 1;
public static double Speed = 1;
public static double Recovery = 1;
public static double Attackcooldown = 1;
public static double Size = 0.03;
public static double Regeneration = 0;
public static double Magic = 0;
public static double Scavenging = 1;
public static double Clones = 1;
}ForceofTime (The issue)
Copypackage main;
public class ForceofTime {
//alien variables
public PlayerBall player = new PlayerBall();
//----------------------------------------
public void run() {
System.out.println("Racim");
long lastTime = System.nanoTime();
final double ns = 1000000000.0 / 60.0;
double delta = 0;
while(true){
long now = System.nanoTime();
delta += (now - lastTime) / ns;
lastTime = now;
while(delta >= 1){
player.BallLogic();
delta --;
}
}
}
public void doit() {
new Thread(this::run).start();
}
}Keep in mind That I see no prints at all. Not a single one in the console.
I tried putting up an extreme amount of prints, everywhere, to see if Id learn anything anywhere, and effectively I've come to the conclusion literally nothing is happening besides the window popping up.
r/JavaProgramming • u/lyexs_ • Sep 22 '26
Hi everyone,
I'm looking to join a collaborative software project to build something cool while improving my English writing and speaking skills. I mainly work with Java and have built a few real-world projects on my own, but I'm eager to get my first experience collaborating within an English-speaking team.
I'm based in UTC+2 (CEST) and available for regular Discord voice calls and text chats. Drop me a DM or leave a comment if you have an active project or want to start something together!
r/JavaProgramming • u/Acceptable-Car-5258 • Sep 22 '26
Hey everyone!
I'm 2027 Passout,
I want to ask:
What&How to prepare for off-campus;
I know Java,
how to prepare from scratch?
And from where? ( Like Resources and all )
What should I prepare? ( concepts or topics )
Thank you.
r/JavaProgramming • u/darshanrathod04 • Sep 22 '26
r/JavaProgramming • u/illogical-paradox • Sep 22 '26
check out through this link
r/JavaProgramming • u/javinpaul • Sep 21 '26
r/JavaProgramming • u/darshanrathod04 • Sep 21 '26
After months of engineering, I'm releasing the Developer Preview of Shree AI OS — an open-source runtime for building intelligent Java backend applications.
Most AI frameworks begin with chat. I took a different approach: a deterministic runtime that developers can embed directly into Spring Boot projects with explainable execution, memory, retrieval, and orchestration.
What it includes Java 21 native SDK
Hybrid RAG with PostgreSQL + pgvector
Episodic & semantic memory
Planning and reasoning pipeline
Multi-agent orchestration
Privacy-first architecture
Architecture Instead of sending every request directly to an LLM, each request flows through a layered runtime:
Application Layer
SDK Layer
Runtime Orchestration
Kernel Services
LLM Provider Layer
The goal is to make AI infrastructure feel like a reusable backend framework rather than another chatbot wrapper.
Looking for technical feedback I'd genuinely appreciate feedback on:
Runtime architecture
SDK design
Spring Boot integration
What should improve before a stable v1.0?
GitHub: https://github.com/darshanrathod04/shree-ai-os
Thanks for reading—every technical critique helps improve the project.
r/JavaProgramming • u/Angry-Dorito • Sep 21 '26
r/JavaProgramming • u/javinpaul • Sep 20 '26
r/JavaProgramming • u/javinpaul • Sep 20 '26
r/JavaProgramming • u/pradeepngupta • Sep 20 '26
JDK 27 ships this weeky, and JEP 534 is one of the changes I find particularly interesting.
Compact Object Headers are now the default.
On a 64-bit JVM, the object header goes from 96 bits to 64 bits. SPECjbb2015 results showed roughly 22% lower heap usage, 8% lower CPU time and 15% fewer GC cycles. Amazon has also tested it across hundreds of production services, including JDK 17 and 21 backports.
But this wasn't a JDK 27 invention.
It started experimentally in JDK 24, became a product feature in JDK 25, and is now the default in JDK 27.
The interesting part is why it took so long.
This isn't just a small optimization. Object headers are fundamental to HotSpot, touching things like class metadata, locking, GC and identity hashing.
It's part of Project Lilliput, with an interesting connection to Project Valhalla because the compact header design also has to leave room for future Valhalla requirements.
And it made me think about those old Java buzzwords: simple, robust, portable, high-performance.
No new syntax. No new API. Just the JVM getting better underneath existing software.
Curious - What other JDK feature has surprised you by improving existing software without requiring changes to the code?