Category "java"

Is it possible to convert a Scratch project to an Android app?

For those of you who don't know, Scratch (scratch.mit.edu) is a programming language based around connecting 'blocks' of code in order to create a project. I h

Spring boot + Kotlin + MongoDb: Cannot resolve reference to bean 'mongoTemplate' while setting bean property

I am trying to make a simple application using kotlin and spring boot which connects to mongodb and makes some operations there, however I am facing this issues

How to initialise Google drive using GoogleCedentials instead of the deprecated GoogleCedential

I have java code to connect to google drive using a service account, this works: JsonFactory JSON_FACTORY = new GsonFactory(); GoogleCredential credential = Go

@Size annotation doesn't seem to work for my class

I have a Spring Boot Controller with an endpoint that accepts the following Configuration class (as json). The class has the param maxIterations and has a @Size

No qualifying bean of type 'org.springframework.kafka.core.ProducerFactory<java.lang.Object, java.lang.Object>'

I use this kafka configuration with spring cloud and spring boot 2.6.6: @Configuration @RefreshScope public class KafkaProducerConfig { @Bean(name = "nativeP

Connect Weblogic server to Eclipse Error: "does not contain a valid WebLogic Server install or the installed version is not supported"

I'm trying to connect a weblogic server to my eclipse (photon) and I keep getting this error message: Error "does not contain a valid WebLogic Server install or

Cant connect Java to MariaDB

I cant connect java to MariaDB .I saw all similar questions answers but none has solved my problem. Here is my code : /** To change this license header, choose

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