Category "java"

Make FileAlterationListenerAdaptor.onFileCreate() always single thread, apache.commons.io.monitor

I'm overriding the onFileCreate() method of the org.apache.commons.io.monitor.FileAlterationListener interface. The method works, but I found that sometimes it

I cannot figure out Uncompilable source code - variable might not have been initialized

I'm new to learning Java and am writing a BMI Calculator program. I've fixed so many errors in my program but just cannot figure this one out! Hopefully, you ca

Are kafka acks received in the same order of produced messages

I'm working on a process that collect data from IBM MQ and process it to a kafka topic. To make sure not loosing any message,I need to commit my JMS message onl

Spring boot: JSP not found (404)

I'm trying to create a new project with spring boot. But I'm getting Error described below. I have added my code. Error HTTP ERROR 404 page not found He

Java: Solving unchecked call

I'm having an issue with unchecked calls even though I already introduced the type parameter to my method. I don't want to suppress the warnings because I'm pre

Switching the first 4 bits of a byte and the last half

I need to switch the first half and the second half of a byte: Make 0011 0101 to 0101 0011 for example I thought it might work this way: For example, i have 10

Gradle archive contains more than 65535 entries

I am integrating hadoop2.5.0 for running mapreduce job and spring-boot-1.2.7 release and getting error while including this 1) archive contains more than 65535

Range queries in Elasticsearch Java API

I have two fields in my ES index: min_duration and max_duration. I want to create a query to find all the documents for input duration such that : min_duration

Unable to verify that GCS bucket exists while creating and staging Dataflow template

I am creating and staging gcp dataflow template in cloud storage with following command: mvn -X compile exec:java -Dexec.mainClass=main.java.TemplatePipeline -D

Why this code can't execute command in Minecraft?

Environment: Minecraft 1.16.5, Fabric 0.11.6 I write these code to try to execute command in Minecraft. @Override public void inventoryTick(ItemStack stack, Wor

Write a recursive method called which takes in an array of integers and returns said array in reversed sorted order

I have a programming exam in a few days so I'm doing some exercises just to practice. However, I've been stuck with this problem and I started to doubt if it's

BeanCreationException: Error creating bean with name 'flywayInitializer'

I am trying to run my project tests in a docker container. All of the tests work just fine when running locally. Errors started occurring when I tried to move m

How to Save Username and Password in Webview

Currently, I am still in the proccess of learning Android development so please excuse me if this question of mine is not easily understandable for you. I creat

How to retrieve data from sql server db in android

this is the first time I am developing an android application. I want to bind some data with grid view or list view based employee id provided on the text box.

usb4Java USB error 3: Unable to open USB device: Access denied (insufficient permissions)

I'm using Windows 10 and Java through Eclipse. I'm pretty new to programming and have been working on a project that requires reading in data from a USB Device.

get id of node in firebase by item in recyclerView

i want to access on this point by clicking on element inside cardView i only can reach to the point before it by using this line reference = FirebaseDatabase.

Datadog wrong displaying of http.server.requests.count metric

In my project we use spring-boot2 with actuator and datadog metrics - package io.micrometer:micrometer-registry-datadog. Metrics are sent to datadog by http API

Android Studio: An exception has occurred in the compiler (1.8.0_152-release)

While running app, unable to complete compilation. Keep throwing error. I am using dagger2 library for annotation. Error:15:04:36.466 [ERROR] [system.err

Login and getting session id of the logged using Https connection in java

I am trying to login to a website using the https requests and then capture the session id. I need this session id inorder to delete some tags in the web applic

how to convert Calendar type to String?

i tried to convert calendar type to String for display the date in my jsp page here is my servlet code where i convert string to calendar type private Evaluat