Category "java"

Java 17 and maven-archetype-quickstart gives error: Source Option 5 is no longer supported

When using the maven command to create a simple Maven project (with the latest versions of maven and java), I get the error: [ERROR] Source option 5 is no longe

How to set activiti task name dynamically?

I need to set task name dynamically for activiti 7, just like below snippt code: <userTask id='theTask' name='${taskNameDynamically}' > ... </u

How to extract the text iterating specific rows within a table using XPath with Selenium and Java

I want to iterate through this table and need to get a text from each row like text inside td= health1, health 2 and health 3, similarly, I need text inside the

Web socket CORS issue in SpringBoot

I was working on implementing web sockets in springboot, I followed the example spring has given in there docs. But I am getting cors error while trying to conn

How to open an activity on the lock screen after FCM notification

How can I open an activity on the lock screen without the user having to click on it? Like for example an alarm or a call. In my code I can get the FCM notifica

Debugging issue in testng test cases

I am using intelliJ v2021.3.2 (Community Edition) My project is a java Maven TestNG (v7.4.0) project When I run test cases it executes successfully, but when I

How to convert String to Generics in java

I have a class similar to this: public class Car<T> { private T model; private CarBodyParts body; } public class CarBodyParts { private Integer

How do I make a Totem of Undying like item with Fabric?

I am new to Minecraft Fabric Modding and I am trying to make a Item like the Totem of Undying but I can't find the Totem code! There is nothing lika a TotemOfU

How to set custom value in SAN while generating CSR in java?

Need to generate CSR with SAN like this Subject Alternative Names: DirName:/SN=1345332443jff432/UID=12347577400003/title=0011/registeredAddress=Sample E/busines

Building multi-module maven project for SonarCloud

I am building a maven project of X amount of modules for the first time for SonarCloud. The sonar.projectKey value needs to be unique, so I set it to ${project.

SEVERE: Servlet [Jersey Web Application] in web application [/restapp] threw load() exception

This is my REST API project. I don't know what this error is. I am trying resolve this error from two days now and i am exhausted now, anyone help me here web p

How can I manage duplicate letters in Wordle Game (JavaFx)?

In my algorithm to compare the secret word with the guessed word, I need to manage the duplicated letters. For example, if the secret word is newly and the gue

How to read Excel cell having Date with Apache POI?

I'm using Apache POI 3.6, I want to read an excel file which has a date like this 8/23/1991. switch (cell.getCellType()) { ... ... case HSSFCell.CE

export and import gson - Failed to invoke public ) with no args

i'm learning how to convert array to json file and import that array with using gson. I have abstract class Shape; public abstract class Shape { private Type ty

rename maven jar-with-dependencies

My plugin section in the pom file looks like this: <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.

How do you disable the auto generated pages /login and /logout using Spring SAML2?

I am using Spring Boot - 2.6.6 and Spring Security - 5.7.0-M2 with the spring-security-saml2-service-provider library to create a SAML service provider applicat

GetMapping endpoint for a button which takes inputs from 2 text fields

I have a basic html page with 2 textboxes and a button. I need to make the button respond after the entries in the textbox The body of the html looks like this

How to make visible a element when the RecyclerView is loaded?

I'm making an social app and I want to implement a system where when you click on the comment button a Input dropdown... The problem is that it doesn't matter w

Access nested class list from outer class

I have a class that has a static nested class with two lists. And one of the functions within the outer class has the return type of this nested class. And this

How do I share an object between two or more WebSocket controllers in Spring Boot?

I have two controllers, namely ControllerA and ControllerB. In ControllerA I have an object (a HashMap) which maps principal names for connected users to their