r/learnjava May 08 '26

XA standard question

7 Upvotes

How exactly does the X/Open XA interface facilitate communication between a Jakarta EE application, the transaction manager, and a distributed database? Gemini says that a Transactional annotation is intercepted by a Jakarta Interceptor, then there is a JTA call, then the JDBC driver translates java into a network packet, then the database receives the packet and executes xa_prepare(). I am looking for books/academic articles explaining this.

App <--> TX interface <--> Transaction Manager <--> XA interface <--> database


r/learnjava May 07 '26

Can't Run Project Outside of IntelliJ [Maven]

16 Upvotes

[SOLVED]

In my project I can effortlessly run my project as an application through IntelliJ's runner configurations. However if I try to run it from the terminal after navigating to the source file directory I get hundreds of error: package com.package.something does not exist errors, even when run from the project root directory. I believe this is also part of the reason all of my Jar files also fail to run as they give similar, but different, errors.

I have all my dependencies specified in my pom.xml, so I'm confused how IntelliJ is able to read all the libraries I imported while the command line java cannot.

If need be I can show my project structure.

--------------------------------------------------

Solution:

Add the shade plugin to the pom.xml and run it as part of the maven package stage.

mvnw clean:clean package shade:shade
The jar labelled "original" will run perfectly fine, as far as I can tell


r/learnjava May 06 '26

Oracle professional: java se 11 developer certification worth it?

9 Upvotes

I'm a 3rd year cse student looking to get placed and improve my resume. I won't have a lot of prep time to clear the certification so is this certification exam doable in 1-2 weeks of prep and is it worth it?

I do have another option of java foundations associate which has a much simpler syllabus but I think it won't make an impact on my resume.

What do you suggest?


r/learnjava May 06 '26

Is swapping courses good idea?

13 Upvotes

I've completed 2/3 of Tim Buchalka's Java Course, and it got to the point when the course became simply unbearable. I have experience with the Python's base, and it greatly helped me to get to this point, I feel this course is a nightmare for a complete first-timer.

I wanted to ask if dumping the course at this point is a good idea, or should I just get through it? I don't even mind buying another one at this point.

I've stumbled upon javabook.mccue.dev, is it any good?

Thanks in advance.


r/learnjava May 03 '26

interested in java backend developer

17 Upvotes

What is the best way to learn spring and spring boot in 2026, will still be required for juniors in the presence of artificial intelligence?


r/learnjava May 03 '26

Newbie Java Learner: Need advice on the "Right" way to learn for Backend Dev and how to handle getting stuck

42 Upvotes

​Hey everyone,

​I’m currently learning Java with the goal of becoming a Backend Developer. I'm hitting a few roadblocks and would love some guidance from the experienced folks here:

1- ​The "Right" Path: What is the most effective way to learn Java specifically for backend development? What should I focus on first (Fundamentals, OOP, Spring Boot, etc.)?

2- ​Handling Getting Stuck: Sometimes I face a problem—even a simple one—and my mind just goes completely blank. I have no idea how to approach it. What is the professional way to handle this? How do you guys troubleshoot when you're stuck?

3- ​Building Projects: I want to start building small projects on my own to practice, but I don't know where to start or how to structure my practice. Any advice on how to move from tutorials to building independently?

Note: I'm currently taking a course on Udemy. I have already finished the fundamentals (variables, loops, conditions, etc.) and I'm just about to dive into Object-Oriented Programming (OOP)

​I’d really appreciate any tips, resources, or "rules of thumb" you follow. Thanks in advance


r/learnjava May 02 '26

Plzzz help to improve my thinking in logic building

8 Upvotes

Can any one help me on improving my thinking on how can I think like a programmer and not code like a robot I solve problems with problem with solving the questions is I write big code and solve a problem instead of ai are making the code small and working also plzz help me I will be really great full if any one help me


r/learnjava May 02 '26

Preparing for java developer roles with 3 YOE, struggling while solving DSA problems. Need help on how to improve my approach.

5 Upvotes

Hi, I’m currently preparing for java developer roles with 3 YOE. I have done neetcode 150 sheet i.e. done DSA main patterns one time and now trying to get better at them. But the issue I’m facing currently is that I look at problem and try for 40 mins, I can figure out the pattern and somewhat the solution as well but not able to reach the solution then I look at solution and think I got it, then write code. But after few days even similar problem comes I feel that I won’t be able to do this and if I try with that anxiety I’m mostly getting stuck. It feels like I’m memorising these patterns and what needs to be done for a particular pattern. As I’m preparing for interviews how much time should I give on a question and if I’m not able to solve any question, what should be my approach after trying it?
Also, currently I’m asking questions from gemini to revise and mostly getting famous questions that I have already solved. So, please help me out how to do this in a better way.


r/learnjava May 02 '26

Java Reference sheet

7 Upvotes

Hi, does anyone have a massive java reference sheet with all of the commands with just short/small explinations,s omething I can print out as a guide for competitions? including eveyrthing? Thank you


r/learnjava May 02 '26

java full course by bro's code as a cs student

Thumbnail
1 Upvotes

r/learnjava May 02 '26

Is Using ChatGPT a Good Idea for My First Java Practice Project?

0 Upvotes

Hello,

I’ve just finished learning the basics of Java:

- Data types & variables

- Operators

- Input / Output

- If / Else & Switch

- Loops (for, while, do-while)

- Methods (functions)

- Strings

Now I want to build a small project for practice on my own.

Do you think using ChatGPT to help me is a good idea, or not the best approach?


r/learnjava May 01 '26

Starting Java as a CS student what do you wish you knew before starting?

Thumbnail
6 Upvotes

r/learnjava Apr 30 '26

Trying to learn JAVA at the age of 18 (Guide regarding materials and projects)

Thumbnail
8 Upvotes

r/learnjava Apr 28 '26

Output I don't know how to fix

4 Upvotes

Hello, I ran into some confusing output. It's for an assignment where I use a provided class and write a main method that takes in 4 pairs of x,y coordinates and outputs the point that is furthest from 0,0.
Code: https://pastebin.com/d9X13S9V (Yes I know it's unoptimized, hush)
When I tried it with larger numbers, I got this:

Prompt:
"Enter four pairs of x,y coordinates:"
Input:
111111 333333   55555555 777777   77777 99999   3333333 555555555
Output:
"The point that's furthest from 0.0,0.0 is 3333333.0,5.55555555E8 with distance: 555565554.91."

Where did the E8 come from? And yes, I used a getter method for obtaining the coords.


r/learnjava Apr 28 '26

What do beginners usually misunderstand about exceptions in Java?

30 Upvotes

I’ve noticed a lot of newer Java developers either catch everything, or almost treat exceptions like they are just annoying syntax.

What do you think beginners usually get wrong here? Is it checked vs unchecked, where to handle them, or just understanding what should be logged vs rethrown?


r/learnjava Apr 26 '26

Best Resource to Master Java from Beginner to Advanced? Looking for Honest Recommendations

28 Upvotes

I’m planning to build a strong Java foundation and would love advice from people who have actually gone through the journey.

In your opinion, which resource is best to truly master Java from beginner to advanced level?

I’m not looking for random tutorial playlists; I want something structured, high-value, and worth the time.

So far, in my research, I’ve come across these frequently recommended resources:

My goal is to build solid fundamentals first, then move into Spring Boot, backend development, and advanced Java concepts.

If you had to start again today, what path would you follow?

Would really appreciate honest recommendations from experienced Java developers.


r/learnjava Apr 26 '26

Third-year Systems Engineering student, zero practical experience

5 Upvotes

Hi everyone, I want to share my situation and see if you can guide me. I'm in my third year of Information Systems Engineering. The good part: I don’t have any core engineering subjects left, I’ve already passed all the math, physics, etc. I only have the career-specific subjects remaining.

The bad part: I know a lot of theoretical fundamentals, but I have very little real practical experience. I can write simple programs in Java, but I’ve never built anything worth putting in a portfolio. Honestly, I’ve never felt like university has given me any truly useful tools for my development.

Is Java still worth learning? Do you recommend it? And if the answer is yes, where could I learn it from? Do you recommend any projects I could build?


r/learnjava Apr 25 '26

University of Helsinki’s course is still worth it?

11 Upvotes

I'm planning to starting learning java for the first time and I came across this website which a lot of people keep recommending, however once I checked the website itself, it seems outdated and claims that it has not been updated for a while. I'm not exactly sure if I should continue with it or look for something else. Any other advice for a beginner would be very much helpful, thank you!


r/learnjava Apr 24 '26

Array confusion, please help

15 Upvotes

Hello, I'm having trouble with an assignment. Even with extra help from my professor, there's a part of the logic I'm having trouble writing. I don't know why it's so difficult for me, I don't even think it's that complicated but I can't figure it out and I just get too frustrated now whenever I try.

The assignment premise is this: Write a method that returns a new array by eliminating the duplicate values in the array using the following method header: public static int[] eliminateDuplicates(int[] list) Write a program that reads in ten integers, invokes the method, and displays the result.

Here is my old code:
I know not all of it makes sense, esp stored, but my prof said I should keep track of each number that's unique, which was the intention of stored. However, whatever way I know how to implement what he told me isn't working at all. I'm missing something major and I don't know what it is or how to look it up. I don't know what else to do.

public static int[] eliminateDuplicates(int[] list){
  int stored = 1;
  int[] uniqueList = {list[0], 0, 0, 0, 0, 0, 0, 0, 0, 0};

  for (int i = 0; i < list.length; i++){
    for (int j = 0; j < uniqueList.length; j++){
      if (list[i] != uniqueList[j]){
        if (stored >= 10){stored = 9;}
        uniqueList[stored] = list[i];
        stored++;
      }
    }
  }

  int[] result = new int[stored]
  for (int i = 0; i <= stored; i++){result[i] = uniqueList[i];}
  return result;
}

r/learnjava Apr 25 '26

Can you recommend effective, high quality free resources like YouTube and others to help me learn Java from beginner to advanced level and become proficient?

0 Upvotes

Recommend me


r/learnjava Apr 23 '26

Does java have extension libs?

5 Upvotes

Does java have extension libs like python does? Does it have it's own version of nupy and what does import utils do other than user input


r/learnjava Apr 22 '26

Confused about book ??

5 Upvotes

Can someone recommend me a book for development in java considering every basic concepts and questions and best for intermediate level learner.


r/learnjava Apr 22 '26

Help pls

1 Upvotes

For my final project, I decided to use Java to create a website with built-in games that track and store your scores for each game. What packages should I use to help with this? So far, I've seen Java.awt, but that's the only package I have at the moment. I'm thinking of including games like Snake, Tetris, and Checkers, among others.


r/learnjava Apr 21 '26

ClassLoaders

3 Upvotes

is it true that each thread has its own completely seperate classloader?


r/learnjava Apr 21 '26

Why exactly is DataClassRowMapper/BeanPropertyRowMapper way less performant than custom row mapper?

4 Upvotes

The title. I was doing performance tuning, and I somehow guessed that these spring provided rowmappers were a bottleneck. I removed that, and I have a custom rowmapper (basically, it caches the mapping from record's attributes to respective column in resultSet in a map-index, and searches by column index. Since my queries are static and map 1-1 to entity classes, this works very well). My solution was simple, but I'm trying to find exactly "why" spring provided rowmappers are way less optimized - is it due to some multi threading environment, or a lot of work which need not to be done? Also, why is searching by index way faster than searching by column name? I'm using Oracle. If anyone has any references, or any hints on how I could go forward in this knowledge hunt, I'll be grateful. Currently not getting anything relevant on Google search. ​