Category "java"

java 8 stream for double loop and change the value in first loop

i have nested loop to loop and change the first list based on condition below. this works fine. its like if cardNumber in firstList same or found in secondList,

how would I use a Font defined inside of a try{} block outside of the block in Java [resolved]

so, I'm working on a clock, and it needs a font (from an external file) to make it look like a 14-segment display instead of the Sans-Serif font it currently us

Android Studio VerifyError rejecting class text_plain from JavaMail API

I'm developing an application that allows the user to contact me by sending an email (the user only inputs the message, sender and receiver emails are both mine

Creating a JAVA Object from XML using Jackson XML for multiple elements with same TAG

I have the following XML Structure which I am using to create a Java Object. <TABLE NAME="AB" ID="10" CODE="ABC123" RANK="102" YEAR="2022" TIMESTAMP="

JsonProperty in java

I found this question in other questions, but I think they are too old and they are not working anymore. I'm consuming an external service that returns a JSON a

Reverse String characters in java

Am trying to reverse a string using a method in java, I can fetch all the elements of the string and print them out in order via a loop, my problem is reversing

How to read config file (*.yaml *.properties) without spring framework

I have a project but not in spring, how can I use annotation to read content in config files like *.yaml or *.properties under resource package.

Creating a hash table with tuple as key

I am trying to implement a HashTable that uses tuples of integers as keys. What i have done so far: import java.util.*; public class Hash_Table_Demo {

JPA Inheritance with JOINED strategy

I've seen many posts about inheritance but nothing match my problem. I try to build a correct objects model: The root class @Entity @Inheritance(strategy = I

Android room persistent: AppDatabase_Impl does not exist

My app database class @Database(entities = {Detail.class}, version = Constant.DATABASE_VERSION) public abstract class AppDatabase extends RoomDatabase { p

Spring Boot - Hibernate - Table does not exists

I have a 3rd party jar that holds all the entities and mapping. I am currently using this jar successfully in a classic Spring-MVC application, but now I am t

Authenticate certain endpoints with custom Filter | Spring Security [duplicate]

1. Overview First things first - I am pretty new to Spring Security so if you see something trivial, please keep that in mind 🤓 I am t

How does kafka consumer auto commit work?

I am reading this one: Automatic Commit The easiest way to commit offsets is to allow the consumer to do it for you. If you configure enable.auto.commit=t

Java Telegram Bot to Convert Celsius to Fahrenheit?

I am trying to have a Telegram Bot respond to a user's input and convert C to F (and vice versa). At the simplest level this is a breakdown of what I would like

Error "You may be mixing active and static modes" in Processing

I am trying to create a simple spaceship game, where there are meteorites falling from the top of the screen. I haven't come far but I got this error that says

Java Project in VS-Code, "No delegateCommandHandler for vscode.java.validateLaunchConfig" Error

I'm new to Java in Visual Studio Code and trying to implement small application, which is using our SDK, which is located in our internal Git Repository. When

Getting error while bundling Vue app with rollup js. CreateElementVNode

Basically, I am building VS code extension using Vue js but bundling the app using rollupjs gives an error. Node version - 14.18.0 Vue Js Version - 2.6.14 Rollu

Where is 'javac' in java-17-openjdk-amd64?

Win10 WSL 2 over an Ubuntu layer Ubuntu: lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release:

Glassfish 5 creates empty temporary copy of EAR file on deploy

I'm trying to deploy an EAR file to a Glassfish 5 server. The exact version is GlassFish Server Open Source Edition 5.0 (build 25). The deploy is done via the a

Spring Security Rejects Fetch OPTIONS Preflight Outright If content-type = 'application/json'

If a Fetch POST to a Spring Security (v 5.6.1) enabled service endpoint sends this header: headers.append("Content-Type", "application/json"); the OPTIONS pref