Category "java"

Fractional Swing UI scale not supported in Java under Linux

I would like to influence the UI scale of a standard Swing application with default L&F. Unfortunately scaling factor 1.0 is too small and 2.0 is too big. I

What is a NullPointerException, and how do I fix it?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause

Testcontainers, Localstack SES and Publishing to SNS

I'm using Spring Boot 2.6.3, with testcontainers version 1.16.3 and aws-java-sdk version 1.12.178. I'm trying to create an Integration test using testcontainers

How do I get values of custom fields of jira service desk api in order to create the request?

How do I get values of custom fields from JIRA service desk api to create the ticket in getter and setter? The field 'customfield_10600' is not valid for this r

Hide Textbox with parameter name completely when the checkbox is disabled in UI

When I enable the checkbox, I've written a js function to enable the textbox to be adjustable; otherwise, it must be greyed out. Changes Made: When I enable the

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;