Java Community | Help. Code. Learn.

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!

Join

java-help

❓︱qotw-answers

Setting up maven build cache extension

Hey, I just discovered the maven build cache extension, so I wanted to give it a whirl. I made a somewhat simple project and it worked great, until I added the maven dependency plugin in my pom to copy over the built artifact into a different folder, if I remove the maven dependency plugin the build cache works properly. Any ideas? version info: Java: Jetbrains Runtime JDK 21.0.5 Maven: 3.9.9...

Hi, could someone help me respect this error? It's haunting me

Cannot run program "C:\Users\Feijoada.jdks\corretto-1.8.0_432\bin\java.exe" (in directory "C:\Program Files\JetBrains\IntelliJ IDEA 2024.2.3\bin"): CreateProcess error=2, The system cannot find the file specified

Selection Sort

Can anyone help me make this test pass? ```@Test public void testMaxPositionMiddle() { int[] x = {1, 5, 3, 7, 8, 9};...

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;...