Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

We are a Community full of Java developers. You can come here to connect other devs, get help, help others and do many more things!

Join

java-help

❓︱qotw-answers

Feedback on Domain Model – Programmatic, Naïve, or Well-Designed?

Hi all, I’m currently reviewing the domain model from our seminar (see attached image), and I’d love your input. Would you describe this domain model as programmatic, naïve, or does it reflect best-practice design principles?...
No description

java executable

hey everyone! I'm rather new to this server so I'm still trying to understand how to ask questions: I'm trying to create a standalone executable of my java program, but I can't get the JDK-22 bundled with the executable. I exported the jar file from eclipse and I'm using launch4j to create the executable the executable runs fine on my machine, but I have the appropriate version of java on my machine...
No description

Lists in Java Spring Web and with the Streams API, are they guaranteed to be array-backed?

I am quite confused when working with Java Spring Web as well as the Streams API regarding what kind of Lists are being provided. Especially in the cases when I call Streams.toList() and if I specify a request body to contain a List. Will these lists be backed by arrays in order to provide constant time access? I previously just assumed (not sure why) that they returned Linked Lists, but I have gotten to a point where I need to use .get() on my lists which worries me about performance.

Rest Api Endpoints

Hi guys, i have a theoretical question that it came when i start building a auto repair shop about the Rest Api Endpoints... My question is when i have groups of users beside the authentication that will be implemented accordingly , i should have a single users endpoint or different based on the user's role and in the users to have only the shared functionality?

regex

please elaborate on the rationale behind the "matcher.matches()" part like why does that work in this context
No description

why is it giving me an error on the regex?

see attached I am following along with Codecademy work and I am putting in exactly what I am being told but it is not working. What could be the problem?
No description

Way to secure spring boot micro services apis that will be consumed by a react native mobile app.

I am building a spring boot micro service applications (resource servers) and one spring cloud gateway which will act as the client that interfaces with the micro service applications and will be consumed by a reactive native mobile app. I am currently considering running one of the micro service as an authorization server and also implement the gateway as a client. Works well with the gateway if authorization grant type is authorization code and the token relay also works well. The problem I am facing now is that this same flow won't be seamless on mobile (if it is even possible) as there will be a couple of redirects that needs to happen to authenticate the user. ...

Issues with Contract Work Percentage Constraint in Employee Scheduling

Hi, I'm working on an employee scheduling system using Timefold and have encountered an issue with implementing a contract work percentage constraint. The goal is to ensure employees are scheduled according to their contract work percentage, but I'm facing a couple of challenges: 1. Employees with 0% Contract Work Percentage:...

Compilation Error

Hello I just got installed the netbeans new version and when I try to running, it says "Compilation Error". Can someone help me? 😢
No description

incompatible types: Position<Entry<K,V>> cannot be converted to Position<Position<Entry<K,V>>>

The images are the two methods that are giving me troubles in my adaptablePQ class and NodePositionList class. The NPL class was made by my prof so it shouldn't have to be edited. The next() method I am invoking takes a Position<E> object and returns a Position<E>. I am not sure why its trying to cast to a nested posEntry and I am not sure how to fix this. Full code if anyone was interested: https://gist.github.com/DaddyPMA/99be770e261695a1652de7a69aae8d70...
No description

Issues with generics and object type

Hello! I am working on an assignment where we have to implement an adaptable priority queue with a sorted list. I think I don't have a full grasp on how generic variables work. I tried to keep everything as E, though it said that my other object types could not be cast to E... I was under the impression E could be any object. In my current code I have changed E and all the object types around to pretty well everything I can think of but it still will not work. My code is linked below, I appreciate any help. Errors: Assignment 4\AdaptablePriorityQueue.java:91: error: incompatible types: NodePositionList<DNode<MyEntry<K,V>>> cannot be converted to NodePositionList<E>...

calendarfx

I need help setting up calendarfx! I am trying to get a functional program to compile using CalendarFX but am running into errors no matter what I try. If anyone has experience using CalendarFX please reach out, I would greatly appreciate it!

Help with Timefold Constraint Stream Type Mismatches in Employee Scheduling

I'm working on an employee scheduling system using Timefold (formerly OptaPlanner) and I'm running into type mismatch issues with my constraint streams. Specifically, I'm trying to implement a work percentage constraint that ensures employees are scheduled according to their preferred work percentage. Here's the relevant part of my constraint: ```java...

IntelliJ does not recognize Maven Project

I started a new project wth Maven, but when i want to start booting my application, it searched for build.gradle. Help.

Testing logs without using logback?

I'm looking to do something like this but I don't want to include logback dependency. Any recs on how to unit test or integration test logging statements? https://stackoverflow.com/questions/4650222/what-is-the-best-way-to-unit-test-slf4j-log-messages...

Hiring a Remote Assistant – Java Help & AI Tasks!

Hey everyone! I’m looking for a dedicated assistant to help with Java-related tasks and AI learning resources. If you're skilled in Java, interested in AI, and meet the requirements below, let’s connect! 🔹 Requirements: ✅ Age: 18+ ✅ Location: Europe, North America, or South America...
No description

Looking for a Java + Spring Boot Learning Community

Hey everyone, I’m currently learning Java and Spring Boot on my own, and while it’s exciting, it can sometimes feel overwhelming. I’d love to connect with others who are also learning or have experience in these technologies. If you’re on the same journey or have insights to share, let’s support each other! Whether it’s discussing concepts, sharing resources, or solving problems together, having a community makes the process easier and more fun. ...

Collaborative Opportunities for Tech & Freelance Projects

Hey everyone, I’ve been thinking—this server has such a positive, collaborative vibe! It’d be amazing if we could extend that energy into tech projects as well. I’m a developer looking for someone with an extra laptop to collaborate on remote tasks. While my budget is modest, I’m open to discussing terms that work for both of us. It could be a long-term partnership that benefits both sides....