Category "java"

How to fix/ learning help understanding basic method and classes, Java code and word Problem

I'm struggling on this problem, given that I'm probably making a basic mistake or I haven't got a clue what I'm doing. platform being a Zybook the problem rea

What is the proper way to add rich text annotation in PDFBox?

I add three annotations into empty PDF: call .setContents("...") call .setRichContents("..."); call .setContents("..."); and .setRichContents("..."); First anno

"TestNG No tests found. Nothing was run" while executing automated tests using Selenium through TestNG

I want to know what exact software should I install before I run my automation project. Selenium web driver, selenium java, testNG, junit was installed but th

How to get kafka offset data, specified on timestamp

I've tried to get the offset from Kafka topic based on timestamp when I tried to run it was throwing null pointer error, Map<TopicPartition, Long> timest

Generate .JAR file using NetBeans 11.0

I'm trying to generate the (.JAR) file using NetBeans 11.0, I have followed some answers like How to create a Jar file in Netbeans but I don't find the Packagin

Execute a single task with multiple threads on a schedule

I have a function foo() that I want to be invoked by multiple threads on an interval. example: want to execute foo() every 100ms with x number of threads. I am

Starting a Gradle Daemon, 2 busy and 6 stopped Daemons could not be reused, use --status for details

When i tried to create a new gradle project with 'gradle init' it just created "infinite" gradle daemons until my memory was full and i got following error afte

error: failed to solve: failed to fetch oauth token: Post "https://auth.docker.io/token": dial tcp: i/o timeout

I'm trying to build a docker image for my java file on my M1 max MacBook, my dockerfile: FROM openjdk:8-alpine COPY . /src/java WORKDIR /src/java RUN ["javac","

The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt

I am using M1 Mac OS11.5.2. I've already downloaded zulu.jdk and zulu.jre, in "/Library/Java/JavaVirtualMachines". I also exported the PATH. echo export "JAVA_H

Why Android Studio profiler heap dump showing about 7x overhead for an arraylist?

I was wondering and testing object's memory allocation on Android/Java and found something strange happening on heap, well maybe it's just normal. Here is what

How do packages work in Java, specifically when using VSCode?

I'm trying to create a folder called 'a' within a project that I'm currently in in VSCode. Within this folder, I am trying to create a file called Solution.java

Java shortcut in VSCode to open JavaDocs

In Intellij the shortcut for showing official Javadoc is CTRL+q. Any shortcut to do this in VSCode?

How to achieve flow like this

I'd like to get flow like this one on the picture. Is there any way to intercept all HTTP request within a docker container, modify their headers and then send

Reason: The elements were left unbound

How can I load List of objects from configuration yml file in java springboot application? I already tried several sources: configuration-properties-in-spring

Injection problem in Spring Boot Test: "messageConverters must not be empty"

I have a strange problem with a Spring Boot Test. The test itself is empty, but it does not even manage to start the application. I get an error "Failed to load

I want to enable logging before running

How can I use Spring boot's logging system before running SpringApplication::run? By the way, I'm using logback and lombok. @slf4j @SpringBootApplication public

Exception in thread "main" java.net.SocketTimeoutException: Connect timed out

When I run the script using web API automation rest assured framework, I am not getting the proper api response and below are the error are posted. at java.base

Cannot resolve method 'equals(long)'

I'm working on a spring boot application. However in my service impl class I'm getting a "Cannot resolve method 'equals(long)' when I try to use the equals() me

Does Log4J2 have an equivalent of Log4J's Renderers?

I'm working in a Java solution that is using log4j 2.11 as its logging framework. I'm also using a library that uses a particular POJO extremely frequently. I w

Spring Boot Admin : java.net.UnknownHostException: Failed to resolve 'SAURABH-PC.mshome.net' after 3 queries

I had executed spring boot admin with two micro-service and eureka server last time. that time it executed but this time it is giving this error and showing in