Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

With more than 20,000 members, join one of the biggest and most active Java Communities on Discord! ☕

Join

java-help

❓︱qotw-answers

Starting a RSPS for me and my friends

Hey i have a source and client downloaded i just need help starting up the RSPS anyone have any experience in the scene that can help me and my friends mess around on it

Gradle, Ebean: Service loader didn't find a SpiContainerFactory?

Hey, I'm having a problem with Ebean at the moment and hope someone here is able to help. It's the first time I'm using Gradle and the first time I'm using Ebean in private, so sorry if there's any obvious mistakes. This is the config I had using the "Getting Started" documentation: ```...

How to 'persist' lists of object inside an object?

This is how I do it but it doesn't seem to work. It keeps on printing 0. If you have any ideas pls help :)
No description

Learning Spring and Spring Boot framework

Most courses I see for spring boot are long hours and go over both Spring and Spring Boot. How much of Spring do I need to know to practically be able to get comfortable with the framework?

How would I have a thread wait on a lambda?

This is my first time messing with threads. The project takes user input with a lambda, so I need to wait until that lambda gets valid data to resume the thread. From my research I havent found a good way to do that other than while (var == null) {} which doesn't seem ideal.

How to test for I/O failure?

I have a try catch block in UI component’s controller class. The catch block catches IOException thrown by FXMLLoader’s static ‘load()’ method, I think. The exception is caught, logged using logger + shown to user in the form of a custom alert. I’ve tried using mockito and mocking fxml loader’s static load() method alongside TestFx for Junit5… but nothing seems to work. ...
No description

IntelliJ IDEA doesn't allow editing.

It doesn't allow me to edit files those already exist and i can open them only in read-only.

How to find the biggest island in the file

I have two-dimensional array of chars called map. Map contains three types of cell: x-land, u-river, o-sea. My task is to find the biggest island. Island is landmass connected in any of eight directions - up, top right, right... and surrounded by sea cells. There is a row that contains only sea tiles and can be interpreted as sealine that sea will not cross. Rivers do not exist on islands. I already made a method to find the longest river but i got stuck on finding the biggest isle, any advices? the answear should be 19 public static int findLargestIsland(int x, int y) {
if (x < 0 x >= columnsAmount y < 0 y >= rowsAmount map[x][y] != 'x') {...

Module Not Found, when doing "mvn clean install"

My project has one Module named useTesting and inside this module theres another 3 Modules (use-assembly, use-core, use-gui). All these Modules do have a module-info.java now I wanted to create another module named use-guiFX which is using things from use-core and use-gui when calling mvn clean install I get the following: ...
No description

Fabric Mod not running externally, but running fine through loom's runClient

My mod runs thru loom's runClient but not when compiled and then ran externally. I've been trying to fix it for like 2 hours, and am completely lost :/ mc log: https://mclo.gs/AHe3BMS build.gradle: https://pastebin.com/ESYGQeVV...

I need help with my crafting not working

I need help with my crafting .json file not doing its job and working

How to choose between using @Enumerated and a converter ? or @PostLoad and @PrePersist ?

Which one is better ? or does it depend, and if it depends, in what does it depend ?

MYSQL Connector Driver Issue

Hi, I'm trying to implement an sql database, but I'm only getting the "No suitable driver found", anyone knows why it could be? implementation group: 'com.mysql', name: 'mysql-connector-j', version: '9.1.0' Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/name?user=user&password=password...

Error: Could not find or load main class

i am facing this problem i dont know what to do now ! Can anyone help me upon this ? ```package com.demo.journalApp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;...

What is the best way to get better at java?

I'm new to java and i just started learning oop and some data structures. I have an upcoming exam in two weeks about oop and synatx in java and overall things such as encapsulations and anonymous class. what is the best way for me to practice this new knowledge and gain some new knowledge too?...

I dont know anything about java, why wont this let me install NeoForge?

this is the latest version of java and ive reinstalled it twice and this NeoForge installer and its just giving me this same error
No description

help with JDK installation

I had jdk 23 and jdk 17 version and i needed jdk 17 version but i couldn't get system to switch to jdk 17 so i just deleted jdk 23 folder. But now when i try java -version ir jus gives me a blank line and i don't know what to do. I tried changing enviorments. I tried restarting and reinstalling. Nothing seemed to work. Maybe you have some suggestions?