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

Removing roll from camera matrix

I have a camera class which is just this: ```java import org.joml.*; public class Camera {...

Deploying my java app to VPS with Github actions and Dockerization

This is the deployment code I got from our existing project ```yml name: build and deploy movie app service backend
...

How do I write a unit test for an in order traversal of a binary tree

``` Java public void inOrder(){ InOrderTraverse(root); } ...

Project obfuscation

Hey Im trying to obfuscate my jar file with proguard, but Im having trouble doing so ``` -dontoptimize -dontpreverify -keep class ** { *; }...

Creating a gradle plugin for a custom JVM language

Hi! I'm currently struggling making a gradle plugin for a simple JVM language I've made. The goal is to make my language buildable using gradle with the least user configuration as possible. I already read this article on sorcersoft, this one on baeldung and this one from dzone. I also read the official gradle documentation....

Bypass SQLRestriction to achieve SoftDelete with "hard delete"

I have this entity: ```java @Entity @SQLRestriction("deleted = false") @Getter...

Doubt in hibernate

so i created these 2 simple entities package src.main.webapp.Entity; ...

Compiling manually via CMD

I'm doing a Java course where they are making me manually compile, however it seems to not be working. Have I done something wrong? Any way to fix this?
No description

Populate Spring Data JPA before each @Test

I want to test my Products repository (or other tests that requires database to be populated first). I have tried using ApplicationListener<ApplicationReadyEvent> previously but even though (in the testing environment), the populating methods seem to have been run, the .save methods called by them returns null for each data creation when populating. My goal is to have the database bootstrapped with the data I have parsed from my CSV parser so it can be used as a Test resource. I have tried so many things, but yet none of them automatic populators work, for it to work, I have to manually populate the data explicitly before tests in the test environment. The DataJpaTest:...

Best modern resources for new Sprint Boot project

Can anyone share their favorite resources on: 1. adding integration tests and setting up tests/mocks for a new Spring Boot 3 project 2. Understand more and any changes around spring context 3. Any new logging features/recss...

help with opening an Http server with java

I am currently opening an http server in an xml file I'm using version 2.17.2 arch type: maven-archetype-quickstart, and when I'm writing "import com.fasterxml.jackson.databind.ObjectMapper;" it responds by error "Cannot resolve symbol 'fasterxml'" can someone help?...

problem here

this method aint working how its supposed to. It works for most cases, but not all for some reason. also not for -+ and -- max value what ever that shoudl mean. The following test cases are failing (also i cant use if statements, dont ask why :/): Test Case · decryptFloat - RandomPositives failed Some positive values seem to produce wrong number triplets ...

Parabola elements calculator

so, im trying to write a program what would calculate the direction of opening, vertex, y intercept, zeros, and vertex form of the equation. how would I go about doing that?

what would relative path be if im building a maven library that will create a txt file and read/writ

How would i tell the library where the path is? would the depencyy folder change based on if its gradle or not? too many things to think about.

SonarQube not finding junit xml files.

I know this isnt strictly java related but since i am using junit ad java within sonarcube i thought id ask: in my sonar-project.properties file i have set the xml file destination as follows: sonar.junit.reportPaths=./testreports/*.xml...