Category "java"

Remote debugging configuration: Java on Netbeans 12

I can successfully deploy and develop java projects remotely from a Windows machine on a RaspberryPi (Raspian). My IDE is Netbeans 12.6 which comes with the opt

IntelliJ (2018.3) with Thymeleaf - NO auto completion on paths to static content?

Code completion for paths and filenames do NOT seem to work in IntelliJ with Thymeleaf: th:src="@{...}" attributes - e.g. files in the resources/static/ folder.

How to prevent Bluetooth Disconnected when moving Fragment

I make a POS in android. I want to make a printing in my apps. To do printing I'm using bluetooth printer. Then, I had success make the bluetooth connection and

`java` command is not found from this Python process. Please ensure Java is installed and PATH is set for `java`

I don't know how to fix this error when I'm trying to run the following code: df = wrapper.read_pdf(r'C:\End_to_End\1902\PN\Scenario1_AllCorrectMin\EPR.pdf

Using reflection to identify if the error thrown matches expected error

I need to write a simple code tester program, but I got stuck comparing the given error class with the test expected class. I am supposed to use reflection in t

Compiling multi module maven projects without installing to local repository

I have a compiling (and packaging) problem in my multi-module maven project. Problem occurs when compiling one of two projects which are siblings and included i

`java` command is not found from this Python process. Please ensure Java is installed and PATH is set for `java`

I don't know how to fix this error when I'm trying to run the following code: df = wrapper.read_pdf(r'C:\End_to_End\1902\PN\Scenario1_AllCorrectMin\EPR.pdf

Hadoop configuration object not pointing to hdfs file system

I am trying to create small Spark program in Java. I am creating a Hadoop configuration object as show below: Configuration conf = new Configuration(false); con

args4J doesn't work with gradle

I'm totally new to gradle so it may be a obvious problem: I'm using eclipse with gradle and I actually have no problem adding dependencies for junit or stuff,

Why the insertion sort is slower than selection sort?

The code for selection sort in Java: public class Selection { public static void sort(Comparable[] a) { int n = a.length; for (int i = 0; i

@PreAuthorize stops propagating exceptions thrown during evaluation of security checks

I have a controller with several endpoints. Every endpoint is mapped to a service which could return 200 or throw an exception, that is then handled and will re

How to set Google Recaptcha Enterprise verification Using Api Key In Java Language?

I am not being able to connect to POST url: https://recaptchaenterprise.googleapis.com/v1/projects/PROJECT_ID/assessments?key=API_KEY JSON BODY: { "event": { "t

CompletableFuture | thenApply vs thenCompose

I can't get my head around the difference between thenApply and thenCompose. So, could someone provide a valid use case? From the Java docs: thenApply(Function&

How to find the last word in a string

I'm trying to create a method that returns the last word in a string but I am having some trouble writing it. I am trying to do it by finding the last blank s

No signature of method: .android() is applicable for argument types. Exception in build.gradle (app)

Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app' Caused by: groovy.lang.MissingMethodException: No signature of

java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook

I'm trying to access an excel file the Apache Workbook module. The code runs perfectly sometimes, but mostly I get an error saying: exception javax.se

how to exclude a folder from checkstyle of Gradle on Intellij

I am new for IntelliJ and Gradle, but I have enough experience on Java and Eclipse. I generated some java classes from wsdl file. I put them under src/main/reso

Cannot use WifiP2pManager.setDeviceName on Android 11 (Wi-Fi Direct)

My team and I are working with Wi-Fi Direct technology on Android devices. Until now, the used devices were on Android 8, 9 and 10. We were able to change the W

Server is not connected. Deploy is not available. IntelliJ 13 and Tomcat 7

Trying to run my app with IntelliJ 13 and Apache tomcat 7.0.42. JDK1.6 Always getting the error Artifact app:war exploded: Server is not connected. Deploy is n

Jenkins does not start properly after reboot on GCE

If I need to restart Jenkins due to installing a plugin for instance the slaves are never turned on. I am using Google Compute Engine. I followed this tutorial: