Category "java"

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver even after using the mySql Maven Dependency on Intellij

I am using Intellij for a servlet project and using maven <dependency> <groupId>mysql</groupId> <artifactId>mysql-conn

Eclipse 'Project Explorer View' doesn't show Errors - Stack Overflow

In the "Project Explorer" view of a maven project, instead of showing errors (compilation) in the project itself (red blade), they appear at the level of the fo

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver even after using the mySql Maven Dependency on Intellij

I am using Intellij for a servlet project and using maven <dependency> <groupId>mysql</groupId> <artifactId>mysql-conn

How to write List<Number> with OpenCSV?

I have the following field inside a StacItem Object: @JsonProperty private List<Number> bbox = null; I made a basic implementation with OpenCSV to write

How to make multiple Scanners with the same input line?

I'm making a terminal game that uses Scanner objects. Up to now, I've had no problems with the way I did things. But now, I want to add "cheat-codes", for that

Java TESSERACT create byte[] instead of pdf file - tessInstance.createDocuments()

Is it possible to generate with Tess4j the byte[] of a PDF with OCR instead of a physical file? I need to make PDF files searchable via OCR, it works but I woul

Discrepancy in Squaring a number stored in double format

I am trying to square a number x but there seems to be some discrepancy in precision while squaring it using Math.pow() and squaring it using multiplication. pu

How to dismiss notification since Android 12?

My app creates a notification with two actions the user can choose. After choosing either of the actions, I want the notification to be automatically dismissed.

JUnit GUI doesn't show executed test methods

I run a test class, the outprint in console is correct, but the list of the @Test methods doesn't appear in the JUnit tab: How to fix it? Does the asterisk o

CustomDeserializer has no default (no arg) constructor

I am consuming a REST Api with RestTemplate. The response I'm getting from the API has lots of nested objects. Here's a little snippet as an example: "formular

Getting a 400 bad request response when submitting a form in Thymeleaf to my spring boot application

I am creating a Spring boot application with a thymeleaf front-end. I am trying to create an object of type "expense" (seen in the code snippet below) but, when

Installation failed with message Error: android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space

I was getting the message > Installation failed with message Failed to establish session. so following some responses to the problem I disabled Instant R

java.util.Arrays.asList when used with removeIf throws UnsupportedOperationException

I am preparing for an OCPJP 8 exam for the next 2 months and currently I this one got my attention as I dont understand why public class BiPredicateTest { p

Room database - edit entities

I have a question. I edited my Room entity from this: @Entity(tableName = "users") public class User { public User(String username, String email, String passwo

Room database - edit entities

I have a question. I edited my Room entity from this: @Entity(tableName = "users") public class User { public User(String username, String email, String passwo

Java garbage collection is performed, but GC notification is not received

I have followed a few examples from various sources, and have the following snippet: private void registerForMemUsageChanges() { List<GarbageCollectorM

Unable to find a usable idle daemon

I am trying to use Talon SRX with WPILib for First Robotics for Java in Visual Studio Code. I follow the instructions here: https://phoenix-documentation.readth

Android Studio 2.3 error: "Gradle sync failed: Cause: services.gradle.org"

After I open a new project in Android Studio 2.3, I receive an error such as: Gradle sync failed: Cause: services.gradle.org Googling just gave me a log f

maven jar plugin with specific filename not work

I am trying to use maven jar a file with a specific filename. <fileName> ${project.build.directory}/${project.artifactId}-${project.version}-SAMLGr

Performance Issues Saving ActiveMQTextMessages

I am trying to consume ActiveMQTextMessages (received as Message objects) and store into a file given a very high data rate (9K a second is the target). I am ru