Skip to content

Tag: maven

Database error with Java Spring boot Project

I am trying to run a Java Spring Boot survey project (Maven Architecture) in my local machine by following steps — mvn clean package connect to created jar file java -jar target/filename.jar Open browser and browse to localhost:8080 Project is running ok, I can input survey data, but I am getting follow…

Dockerfile to run a Java 11 class

I’m attempting to write the simplest docker file that will run a main class named InsertVolume in package scripts. Here is my Dockerfile : Here is the result of running command : When I then attempt to run the image using : I receive error : The mvn command mvn compile exec:java -Dexec.mainClass=”…

Setting up multi-release JAR unit tests

I have a project that uses a lot of reflection, also on “new” Java features such as records and sealed classes. I’m writing a class like this: Of course, this only works in Java 16 and higher, so I’m trying to set up a multi-release JAR file, with a default implementation like this: I&…

How to bundle a JAR file with its dependencies using maven

I am developing a Java agent using ByteBuddy, and I need the ByteBuddy library .jar file to be included in the agent .jar file. So far, in order for the agent to run smoothly, I need the ByteBuddy library .jar files to be present in the classpath both at compile time and at runtime. How can I bundle a .jar

Pi4j to use java with raspberry Pi not working

I am honestly about to just give up, i’ve tried so many different possibilities, for multiple weeks now, almost a month, of multiple problems. I am a new-ish programmer, especially with java, but i have a good understanding about java I am able to create a maven project no problem, i have no problems wi…