Category "java"

Getting / Searching in array

How can I get the value of int "icon" from the Int values array with an example: 2 = R.drawable.ic_blue? or: how to get: R.drawable.ic_blue? knowing id: 2? publ

Error 500 when exporting to Excel with jett

When I export Excel with jett I get this error. I lost a few days because of it Maven: <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -

I am doing bottom navigationview but my Fragments are stacking on top of each other

I am new in android and I don't know what's up with my code I need help I put 2 or 3 code in same one and somehow works, but only problem I have with this is In

Thymeleaf can't find templates

I have a Spring Boot Thymeleaf Java project that works perfectly in my local git. Thing is, I tried to clone this same project from my GitHub repository and now

Too many org.apache.kafka.common.metrics.stats.* instance been loaded caused OOM issue

we have project using kafka and kafka stream, recently we found OOM issue happen for the project, after analysis the dump file, we found that too many 'org.apac

Java JAR file runs on local machine but missing file on others

The JAR file consists of the ffmpeg.exe file and it can run normally on my machine without any problems. However, if I try to run it on another computer it woul

Get context in xml for "onDraw" in a custom view

I want to load an image from url in onDraw method for the view preview. I tried to do this using Picasso. But, I get an error in the xml. This is the onDraw met

How to "require" module "gwt.user" On Java, JDK17, "module-info.java", Netbeans, Maven (Problem Continues)

one can say that, it is a continuation of questionHow to "require" module "gwt.user" On Java, JDK17, "module-info.java", Netbeans, Maven I am updating my old li

How to get both parts and InputStream from a request

I can't get the parts of a HTTP request and its InputStream at the same time. If I read the InputStream, then the part will be null. And I tried to save them, b

Embedded Kafka contract tests randomly failing

I am using the spring cloud contrat to test a kafkaListsener of my service. I use EmbeddedKafka together with the spring cloud contract. The listener in my serv

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