JCH
Java Community | Help. Code. Learn.
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
JoinJCH
Java Community | Help. Code. Learn.
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
Join'SoundInstance' is abstract; cannot be instantiated
Hi, I've been trying to make a minecraft mod that plays an audio file when I'm idle, and since I don't know anything about coding, and don't enough braincells to learn (trust me, I've tried a couple times), I've had to use AI.
14 hours later, and 100 something errors fixed, I'm left with a single one neither the AI or I can figure out.
'SoundInstance' is abstract; cannot be instantiated
```...
Spring data R2DBC without spring
Hi is there any replacement for
spring-boot-starter-data-r2dbc
with Guice?
I'm mostly interested in something close to the ReactiveCrudRepository<>
with R2DBC compatibility where it can just codegen a lot of boilerplate code....GET or POST in API
Hey, quick programming question because we’ve got a heated discussion in company.I’ve got a REST endpoint that fetches data about the number of kids in specific facilities within a given date range (e.g., from August 1st to August 31st). Right now, I’m using POST, and in the request body I pass an object that contains a list of facility IDs and the date range (from / to). The discussion started because some people say it should be a GET instead of a POST, but in my opinion POST makes more sense here. Otherwise, I’d have to either pass dozens of companyId values in the URL or call the endpoint multiple times, which feels wrong.
So what do you think — are you team POST or GET here? Or maybe there’s a secret third option I don’t know about?...

Class couldn't have been found
I'm trying to compile a plugin but somehow it says the following:
Error: The main class ToDoList was not found or loaded
Caused by: java.lang.ClassNotFoundException: ToDoList
...Java Springboot OAuth2 Authorization Server and Resource Server.
I am currently writing a oauth2 authentication service, like google auth provider.
In my usecase i am storing user credentials in mongodb and storing sessions in a redis-server over springboot repositories that make that realy simple to use.
Currently i am struggling with writing the resource-server because i am thinking about how to plan the routes of the api-server and the problem that i got with this is that i am providing an PermissionGroup that Provides PermissionScopes like Authorities. The Client Application got a field with a list of PermissionScopes. That is because i wanna check if it has permission to request the data of a user for example. The Client Application has to be registered at my auth-server, checking redirectUrl, and the algrthm to secure the login for the user to the right frontend.
My Problems are the following. I got a Springboot SecureConfig that looks fine, and when i wanna reset my password for example it directly put me back to the login page. The Auth-server it self host the UI for the login, but only when the authorize url is called with a valid clientId that is registered in my mongodb. It also calls automaticly https://identity.seriuxmod.net/login but when i try to call https://identity.seriuxmod.net/authorize?clientId=.... it´redirects me to /login....
Assigning variables to players in minecraft & saving them
So I've recently started learning java and I have 2 huge roadblocks in every single program I make which are variables that save their respective data on server restart/player rejoin and assigning the same variable to multiple players with different values (for example, 100 ''Level'' variables which have the user's progress such as level 1 for someone, level 3 for another person, etc...)
One of the solutions for the assigning variables that I had were hashmaps but I have no idea how to use them no matter what I do as I could do basic hashmaps but not hashmaps that grab the player's id and assign a variable to each. And a solution that I thought for the saving part was preference api which doesn't seem to work.
I would love to hear some insight from more experienced people and learn how to fix this issue....
Need help with a this statement question | beginner
Hey guys Im a beginner in Java and I have a question regarding constructors and inheritance. If I have a constructor in a subclass am I able to use a this statement in a constructor and a super() in the next constructor?
How to get a picture out of the program (visual)
HII! Someone please can help me how can i get the logo.png half out of the program and the another half in the program (the second picture is how i want it) (and the first picture is mine) Here is the code

Lombok @Builder "cannot find symbol" error with Maven & IntelliJ
Hey everyone, I'm facing a frustrating issue with Project Lombok and could use some help. I'm working on a Spring Boot project using IntelliJ IDEA and Maven, and I'm getting a java: cannot find symbol error for the builder() method.
The error occurs in my test class ShutterResponseDTOTest.java when I try to instantiate a DTO using the builder pattern. Here are the relevant code snippets and the full error message.
What I've already checked and done:...

fabric mod
im trying to make a region map for donutsmp but idk how to make it i have the code for 1.21.4 but i need it on 1.21 and i need to transfer it from a meteor addon code to a fabric mod code
Minecraft Command not working
```package org.main.main;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;...

java vs mern
i am beginner , looking forward to make a project (deployable website) , for backend should i consider on of mern of java for webtech , which of them seems a better idea to you all ?
An exception occurred while executing the Java class. Unsupported major.minor version 68.0
I am testing graalvm espresso.
...
$ java --version
Espresso 64-Bit VM Oracle GraalVM 21.0.2+13.1 (build 21-espresso-24.2.0, mixed mode)
$ java --version
Espresso 64-Bit VM Oracle GraalVM 21.0.2+13.1 (build 21-espresso-24.2.0, mixed mode)
Java tech interview
Hi everyone,
Two weeks ago, I had a technical interview for a Java position. It went fine, and the interviewer told me they would let me know within two weeks, yes or no.
I didn’t hear anything in that time, but after the two weeks passed, I got this message:...
PDFBox Arabic Text Overlay Issue: Garbled/Misplaced Text in Fallback Method
I'm trying to create a PDF from a JavaFX application using PDFBox and fill in a template. The output PDF is generated, but the text is garbled, misplaced, or not showing up correctly, especially the Arabic text.
I need help yall!...
I need help
I want to make an animation and graphic design application called Cranimate, and i'm planning to use three main coding languages for it:
- C++ (Core Engine)
- JavaScript/Node.js (GUI)
- and Python (Scripts)
I might add other code binding to it later on...
Urgent Help PLS
I need some help in terms of separating the code into new files for each question, like all my answers are on one file and i cant seem to get it working separately on each file
i have attached a brief in terms of what the answers need to fulfil
ive attached my code too...

I need something faster than BigInteger.probablePrime
i have an method:
```java
public SSPSharedPair createSharedPair() { // slow method
Timer timer = new Timer() {{ this.run(); }};
...