Category "java"

Do not concatenate text displayed with setText. Use resource string with placeholders

I am a newbie in android development, I want to provide a number to setText, I am facing this problem and tried many ways to solve it. Code is: public class Gam

XADES4j : is not a valid Win32 application (pkcs11)?

I used the XADES4j project to sign electronic invoices using JavaSE-1.8 (jre1.8.0_121) 32-bit version + Windows32Bits + eclipse (32-bit Luna) + Gemalto token an

Integer.parseInt is best way to convert String to Int in Java?

We normally use Integer.parseInt method for String to Integer conversion in JAVA, but when I check the implementation of parseInt method it goes way deep that I

Permission Error When Exporting to $JAVA_HOME on MacOS Big Sur

Whenever I try to set my Java Home export JAVA_HOME=$(/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home) in my .zshenv or .zshrc files, I ge

Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

I am new in Android Studio. After setup, When I am trying to import an application I am getting that error So that gradle not able to build. Error:Could not i

How do I use Java's bitwise operators in Kotlin?

Java has binary-or | and binary-and & operators: int a = 5 | 10; int b = 5 & 10; They do not seem to work in Kotlin: val a = 5 | 10; val b = 5 &

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.