Category "java"

Getting java.io.IOException: Server returned HTTP response code: 400 for URL: when using a url which return 400 status code

I am trying to perform a get request using Groovy using the below code: String url = "url of endpoint" def responseXml = new XmlSlurper().parse(url) If the endp

Android gamepad app to dispatchKeyEvent to another app (game)

I am developing a game controller app for a school project that displays a virtual gamepad and is aimed at controlling any game app on Android. Of course, the g

It is possible to Stream data from beam (Scio) to an S3 bucket?

Currently, I'm working on a project which extracts data from a BigQuery table using Scio in Scala. I'm able to extract and ingest the data into ElasticSearch, b

IntelliJ : Cannot resolve method 'run(java.lang.Class, String[])'

I've encountered a problem where on all of my applications, there's a red cross on the top right. I can run it, but the cross doesn't seem to go away. I've open

Android Java - how to clear repeat drawings?

I have this code where I draw on a canvas then convert to a bitmap. predictBtn.setOnClickListener(new View.OnClickListener() { @Override

Run loom demo on IDEA

I want to run loom's demo, I downloaded jdk18-loom from http://jdk.java.net/loom/, and downloaded the latest version of IDEA: No matter I choose X or 17-previe

jenv can't find java 17 installed through the brew on MacOS

I'm trying to install JDK 17 to macOS BigSur (11.5.2) using brew install openjdk@17 > brew install openjdk@17 Running `brew update --preinstall`... ==> Au

Wildfly 26 changed behaviour of REST with content type "x-www-form-urlencoded"

while updating from Wildfly version 24 to version 26 I found an anoying change within REST. If I post with curl some data, it is just not received on the server

Eclipse Collections - Is there a containsAny() method for Sets?

I can't seem to find a containsAny() method for SetIterable types in Eclipse Collections. Is there one? MutableSet<String> set1 = Sets.mutable.of("a", "b"

Error creating bean with name 'entityManagerFactory' caused by java.lang.IllegalStateException

In the code I do not even use entityManagerFactory. I extend JPARepository and for creating the tables I have entities annotated with @Entity (using javax.persi

Java problem loading native lib inside jar

(I slightly re-edited my post as I found out that I need just one native lib, not all 4 as previously thought) I am on Windows 7 x64, and I try to pack my nativ

For example, I need it to run as long as the values in the table day = Value 1 and in the table gender = boy

How to force execution in a "While" loop until it reaches a certain value in the database table. For example, I need it to run as long as the values in the tabl

How to lazy initialize spring-boot datasource?spring.data

I have a spring-boot application that defines a mysql DataSource: spring.datasource.url=... spring.datasource.username=... spring.datasource.password=... I r

How to hide the default android webview progress bar?

i work on an app that displays a page through a webview. I have implemented my own progress bar and it works fine. However i cannot get rid of the default andro

what else we can use instead of import com.sun.management.OperatingSystemMXBean as this import is giving me Sonar issue

Due to project sec. issues . Not allowed to use com.sun.management.OperatingSystemMXBean . Instead i am trying to use java.lang.management.OperatingSystemMXBean

Parquet Binary storing value in encoded format

I'm creating a parquet file from Java using org.apache.parquet.*. No issues with other data types, but when a binary value is written and I cat the parquet file

Serialising order annotations for XML on Jackson does not work

I already googled this problem for almost a day and tried several fixes (including 4 or 5 from StackOverflow) but none of them worked. I have this POJO with ann

Spring Boot Oauth2 autoconfigure cycle after upgrade

I'm upgrading my application from Spring Boot 2.5.4 to 2.6.1 and having depency issues: **Description: The dependencies of some of the beans in the application

Maven test fail on terminal but passes in IntelliJ

My Spring Boot application uses TestNG and it has the surefire plugin. I am attempting to package it on the terminal but it keeps failing on the maven test step

Cannot determine path to 'tools.jar' library for 18 (C:/Program Files/jdk-18.0.1.1)

i want to run my code in intellij ide (community edition) and when i try to run it, i got this error Cannot determine path to 'tools.jar' library for 18 (C:/Pr