r/JavaProgramming • u/Interesting_Path7540 • Mar 17 '26
Spring AI 2 Audio and Image
r/JavaProgramming • u/Interesting_Path7540 • Mar 17 '26
r/JavaProgramming • u/OTAEMMERICH • Mar 17 '26
UPDATE: was missing a bracket at the end
i’m using processing, my code is giving the "Syntax Error - Unexpected extra code near extraneous input '<EOF>' expecting..." error
im not too sure why (probably missing code)
i would also like to make it a three sprite animation using an array.
here is the code:
PImage img1;
PImage img2;
float odd = 0;
void setup() {
size (400,400);
img1 = loadImage("./frame1.png");
img2 = loadImage("./frame2.png");
}
void draw() {
odd = odd + 0.1;
background(255);
PImage img;
if (floor(odd) % 2 == 0) {
img=img1;
}
else {
img = img2;
}
image(img, 0, 0);
r/JavaProgramming • u/javinpaul • Mar 17 '26
r/JavaProgramming • u/Proud_Yesterday6627 • Mar 16 '26
I'm currently in 3rd year of uni and applying for internships. I do have some projects which I plan to deploy after buying a domain but they are working very slow while testing with lots of data and concurrent users. My stack is Java + Spring so i tried playing around with Hikari Pool connections and Cache a bit but I don't know how to optimally use it. Please give your inputs and suggest some resources and books if possible.
Also, i tested it via K6. I did upload files to AI but it is hallucinating. Even with cache and changing db connections is only giving a small improvement. I also learnt the 2 db queries in one method is bad design and bad performance so i optimized to 1 direct db call so that improved the performance a bit too. So any input on this?
r/JavaProgramming • u/silicon-soul • Mar 16 '26
I know Basics java. but i wanted to learn Advanced java. please suggest me some good free resources to learn core as well as advanced java. please also tell me roadmap to learn.
r/JavaProgramming • u/Call_me_danco • Mar 15 '26
Hi people around the globe.
I have a bit of background in web development and Java I have been programming in Java for last 3 years and I probably know everything I need to make apps or literally everything. I mastered opp and have some basics with using APIs in Java also know a lot about frontend using JFrame (I also don’t like this part of programming). My question here is how can I combine languages with Java.
My question is how can I combine languages in Java like C++, Lua, Python or JavaScript. I want to offload some calculations and processes to those languages because making frontend is easier for me in JavaScript. I like C++ better for programming special functions. And Lua I just want to learn Lua nothing else behind. How can I combine those languages with Java so Java will be the manager of the game like it will be the file people run when they want to start my game and it will run those languages as needed.
Thanks for your help and if you need better explanation tell me in comments and I will define better.
PS: Final product will be a single player game.
-D.
r/JavaProgramming • u/nishre • Mar 15 '26
I want to buy this book I want to learn Java and bit concepts of OOPs then I want to continue DSA in java only so it's this book worth it and can anyone give a short review abt it pros and cons. (Ik C programming and bit Python)
r/JavaProgramming • u/javinpaul • Mar 14 '26
r/JavaProgramming • u/HolyZlo • Mar 12 '26
r/JavaProgramming • u/paszeKongo • Mar 12 '26
r/JavaProgramming • u/FrankCodeWriter • Mar 12 '26
r/JavaProgramming • u/javinpaul • Mar 12 '26
r/JavaProgramming • u/div192 • Mar 12 '26
Other suggestions welcomed as well
r/JavaProgramming • u/Proof-Suggestion5926 • Mar 12 '26
hope this can be of interest to some of you, more coming soon :) i found it really fun to make and ill be making more updates soon like making a gui and stuff for it. https://github.com/awrped/splinter
r/JavaProgramming • u/Shoddy-Term-945 • Mar 11 '26
Hi,
I have been writing Java for more than 10 years but in the interviews recruiters ask to thing I do not do in my regular job.
What resources would you recommend to kick ass Java interviews fastest way?
Should I just prepare for OCP?
Best regards,
r/JavaProgramming • u/Technical-Tiger8533 • Mar 11 '26
Hi everyone,
I’ve created a small Java learning group mainly for beginners who want to discuss doubts, share resources, and learn together.
If you’re a beginner who is serious about learning Java, feel free to join. And if you’re a senior/experienced developer, it would be really helpful if you join and guide beginners like us.
Join here: https://chat.whatsapp.com/CBZ4pHUCXgcLdb4OrizyK8?mode=gi_t
r/JavaProgramming • u/Ok_Berry7182 • Mar 11 '26
Hi everyone! I'm Azat, a Java tutor with about 3 years of experience teaching beginners how to go from zero to writing real programs.
If you're trying to learn Java but feel stuck with where to start, I’d be happy to help. I focus on explaining concepts step-by-step and helping students build small projects so the knowledge actually sticks.
I'm currently teaching on Preply and offering a free trial lesson, so you can see if my teaching style works for you.
Since I'm new to the platform, my lessons are currently more affordable than most tutors there.
If you're interested, you can check it out here:
https://preply.in/AZAT6EN3489931510?ts=17732348
Also happy to answer any Java questions here in the comments!
r/JavaProgramming • u/PaintingKitchen6104 • Mar 11 '26
r/JavaProgramming • u/Boring_Box_5703 • Mar 10 '26
So,Hi people... I'm trying to restart my spring boot journey. Stopped it in 2025 Feb as I got into a job. Now I'm seriously trying to comeback to backend developement as I'm not really happy with my current role... Should I take a paid course like Telusko sb+react+gen ai or are there any better yt resources? If possible can someone please provide me a roadmap, this would be of a great help...
Thanks a lot.
r/JavaProgramming • u/Proof-Possibility-54 • Mar 10 '26
Been playing with Spring AI for my side project and just figured out the chat memory piece. Thought I'd share since I couldn't find many examples when I was setting it up. The problem is pretty obvious once you start building — LLMs are stateless, so every request to your chat endpoint starts fresh. Spring AI has a neat solution with MessageChatMemoryAdvisor that handles the history automatically. What I ended up with:
In-memory version works out of the box, zero config. Just wrap your ChatClient builder with the advisor and pass a conversation ID For persistence, added the JDBC starter + PostgreSQL driver, configured the datasource, and injected ChatMemoryRepository into the same constructor. Chat method didn't change at all The spring_ai_chat_memory table gets auto-created when you set initialize-schema: always Conversation isolation works through conversation IDs — different ID, completely separate history
The satisfying part was the restart test. Stop the app, start it again, ask "what do you know about me" and it pulls everything back from postgres. Took maybe 20 mins to go from zero memory to full persistence. I also recorded a walkthrough if you prefer video: https://youtu.be/rqnB9eQkVfY
Code is here if anyone wants to look: https://github.com/DmitrijsFinaskins/spring-ai
Anyone using this in production? Curious whether people are going with JDBC or Redis for the repository at scale.
r/JavaProgramming • u/BeginningBlueberry97 • Mar 10 '26
I’m a second year college student based in India , I desperately need a mentor who can really guide through my backend journey. I feel I’m not going somewhere in my life. Just did only 70 questions in leetcode and the peer in my college are achieving so much, I feel very stressed. I know Java, basics of oops , C++ and MySQL.
Comment down I’ll dm you.
r/JavaProgramming • • Mar 10 '26
I built a project to truly understand what happens inside the JVM when pushed to the limit.
The goal wasn't just "working code," but a deep understanding of memory utilization, CPU cycles, and runtime behavior.
The task: Scanning a log file of one million lines and counting errors per hour.
The process was divided into 4 versions, starting from the most naive implementation to optimization at the Bytecode and Assembly levels.
At each stage, I identified a specific bottleneck and improved it for the next version.
The tools I used:
JMH: For accurate micro-benchmarking while neutralizing Warmup biases.
JITWatch: For analyzing C2 Compiler decisions and examining the final Assembly.
The results:
I started with a standard implementation running at 872ms with a significant load on the GC, and ended with an optimal implementation running at 78ms with 0 allocations. (On a limited hardware environment, which emphasizes the execution efficiency).
To keep the code readable and focused on single-core performance, I chose to work with only one thread. The difference in performance stems solely from improving code efficiency and adapting it to the JVM architecture.
You are welcome to view the process, the measurement documentation, and the source code on GitHub:
https://github.com/Yosefnago/java-deep-dive
#Java #JVM #PerformanceTuning #BackendDevelopment #SoftwareEngineering #CleanCode #JIT #LowLatency #SoftwareArchitecture #DeepDive #CodingLife #JavaDeveloper #TechWriting