Category "java"

getResourceAsStream returns null

I'm loading a text file from within a package in a compiled JAR of my Java project. The relevant directory structure is as follows: /src/initialization/Lifepat

Apache POI: default Excel cell styles

Is there are a way to use default Excel cell styles (see below) in Apache POI, similar to default data formats in BuiltinFormats?

Mockito verify still fails on using all Matchers

I am recently writing a JUnit test and I acknowledged that Mockito either needs all Raw values or using all Matchers but I find the following case still fails w

update one or more fields inside of a document, without updating all the fields

I have a feature in my program where I have to enter the user's details such as the user's age, height, and weight. This data will be stored in Firestore. this

?Invalid char constant compile error ?cannot able to declare in java

I am trying declare char constant in java it throwing invalid constant error. public static final char code = 'RETURN';

Getting "Cannot use dynamic template data with a legacy template" with non-legacy template

I'm attempting to integrate with Sendgrid and am having a heck of a time. I have created a dynamic template - a new one, not a legacy one - with a single handl

why sites are not displayed correctly on heroku

I'm new to Java development. I made an application that checks the functionality of sites. When you start the Spring application, all sites work and display cor

SOAP Faults <detail> in http response not visible

I have one issue. I've generated a WS server from a wsdl and i'm am trying to understand the exceptions handiling. Basically in the WSDL is defined a custom exc

How do I implement the looping functionality in my BrainFuck Interpreter?

There's multiple questions here already, but I'll still proceed. This is a simple BrainFuck interpreter. I figured out all the other symbols, but I can't figure

Return number of nodes equal to degree k

Below is the function we'd be required to fill public Integer numVerticesGtrDegreeK(Integer v, Integer k); // PRE: Graph is connected, v is the id of a ver

Create custom formatter for logging in Quarkus

I have a problem with logs displayed in Splunk. Every exception element stack trace being splitted into separated log. Unfortunately I don't have access to Splu

Problem : java.lang.NullPointerException: Argument must not be null

I have a problem in this line : public class ShowAllAdapter extends RecyclerView.Adapter<ShowAllAdapter.ViewHolder> { and in this line : Glide.with(conte

How do we open google map from a button inside onBindViewHolder? [duplicate]

I would like to open google map on button click. The code below works but when I went back to the app, it throws FATAL EXCEPTION. The button i

Java OOMs on ignite server nodes although onheap enabled

In our project we are currently (still) using Apache Ignite 2.81. We are currently facing OOMs on server nodes when multiple clients are simultaneously fetching

How to use WS-Addressing and get messageId

I'm stuck on WS-Addressing with Apache CXF. I tried everything I found on the Web but without good results. There are two applications, a server and a client, t

What is the best way to Null check input fields in the request object in Java?

I have a Code Like this: Insurance Dto: private String accidentNo; private String birthDate; private String mobileNo; private String ssn; public Insurance

How to display Images from Internet in JavaFX(not working)?

I want to take the url of a image from a API, which I did. I also get the URL of the image that I want, but the image doesn't display in the JavaFX Scene. Strin

Creating Game using multithreading, but have problems with smoothness of background movement in Java Swing

I'm working on a project which is about creating a game. I was implementing threads to move my background but had some problems with the smoothness of backgroun

How to change a number written in a string form to an integer number

This is the code which I thought is supposed to work but it just returns garbage in the array I think and I've been trying to fix it but I can't find the error.

SELinux blocks execution of native executable on Android

I am trying to run my own native executable. The code looks like this: String[] command = {"/data/user/0/org.smowsoft.systeminformation.nativelib.test/files/smo