Category "java"

java.lang.stackoverflowerror error in recursion

I've been trying to print the numeric pattern 4,5,9,18,34 through recursion but I'm getting java.lang.stackoverflowerror error. Here is my code for your referen

how to add external file to maven package output jar during runtime?

I have a spring maven project. In that Project (root folder), I have folder called config which contains multiple folder like t1, t2, t3 etc, Inside of each fol

How can I get an array of all valid system AudioFormat objects in Java

I am creating an object that can play synthesised audio in Java but I need to be able to set it to the AudioFormat with the Operating system's highest possible

Does my code follows the principle of Polymorphism?

I'm a newbie to Java and I attempt to achieve Polymorphism with the requirements of using the following: super keyword overriding having more than two classes g

Printing the 2nd values in 2d Array

What change do I need to make in the following code public void demo() { int[][] num = {{0, 30}, {5, 10}, {15, 20}}; for(int i = 0; i < num.length;

Building a select query using Spring Data Specification

I'm trying to build a select query with Spring Data Specification. The query in question is the following: SELECT * FROM product WHERE id IN (SELECT product_id

java.net.UnknownHostException: "localhost": Name or service not known

I'm trying to connect to Redis in Java using Jedis. I'm doing this simply like return new JedisPool(jedisPoolConfig, redisData.get("address"

Android appcompat edittext input automatically changes to selected language text problem

Hi Every One I am facing rare problem in an android app currently I am working on. Whenever my app has changed to different language except from english.EditTex

How to make inherited fields of non-audited base entity being audited for audited child entity in JPA?

I have a base entity not intended to be audited: @Data @MappedSuperclass @EqualsAndHashCode(of = {"id"}) public abstract class BaseEntity implements Serializabl

How to write Java that calls a package function? Making a slight change to working Java code

With the help provided in the response to my previous question: Invalid Index trying to call a simple Oracle PROCEDURE from Java I was able to call an Oracle pa

Android Studio - blank white screen when running Ionic App on an emulator

I'm working on an Ionic App. It's running fine both in iOS emulator (via Xcode) and via ionic serve, but when trying to run it on an android emulator in Android

listview not getting data correctly

okay, so i got a listView in my android app to display messages, everything has been going good ever since i got help on time but now i got a bug where the last

Got a java.lang.IllegalArgumentException when sending a Java object by the dynamic TCP/IP integration flow?

Gary Russell helped me some time ago with the following 'DynamicTcpServer' flow (see Building a TCP/IP server with SI's dynamic flow registration) having now a

Throwing java.lang.IllegalAccessException module java.base does not open java.util.concurrent when running Corretto on Java

I have 2 microservices: serviceBFF, serviceCore. Stack Spring Boot 2.6.6 Amazon Corretto 17 (Docker) OpenJDK 17 (local) Docker (latest) serviceBFF calls a REST

Consider defining a bean of type 'Mapper' in your configuration [Spring-Boot]

mapstruct doesn't work on my Spring Boot project. I added dependencies, path, Mapper annotations (componentModel="spring") in the mapper interface and still get

Java Selenium - how to test browser network -> payload?

Java Selenium - how to test browser network -> payload ? I have following code that works: WebDriver driver; BrowserMobProxyServer proxy; Proxy

Service stope after few Hours in android

I am creating one foreground service and start this service using STICKY. It detect phone lock and on event. It working fine for few hours but after some time t

Reentrant lock not updating the shared resource properly

I have a shared variable count, which I am incrementing in increment() method and two threads are access this. I'm getting the wrong final count. Here is the s

Java doesn't support IRI?

Example code: java.net.URI.create("http://测试.com").getHost(); // return null new java.net.URL("http://测试.com").getHost(); // return

My code returns an error when trying to split a vector

I have a problem with a Java code and I can't solve it, I have a Vector with 3.529 .txt files and I wanted to split it into 6 other vectors. I'm using the code