Category "java"

what is different between ANDROID_HOME & ANDROID_SDK_HOME

I have 2 directory that look same, ANDROID_HOME=C:\Android\sdk ANDROID_SDK_HOME=C:\Users[user]\AppData\Local\Android\Sdk whats the different? can I set it in

log4j not creating log files

Below is the log4j.properties file which i have used in a project to generate logs. But the logs are not getting generated at the mentioned location. log4j.r

What is the role of the temp integer in the bubble sort code

int[] array = {4, 5, 7, 6, 9, 10,67,6,45}; for (int i = 0; i < array.length; i++) { for (int j = i+1; j < array.length; j++) { if (array[i] &g

How can I randomly pull out a String from an array list and put it in another?

As seen in the code that I tried to write, I want to grab a name from the Array list "names" and either add it to groupA or B. I do not need the groups to be ev

Apache spark, is it possible to have Google guice as dependency injection technique

Is it possible to use Google guice as dependency injection provider for a Apache spark Java application? I am able to achieve this if the execution is happening

A Gradle based sub-project throws `Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMain` during the build

I have a Gradle based multi-project. The issue is with one of the sub-projects. I have some tests there, but all code inside is commented out. Whenener I run "b

Spring Boot JMS MappingJackson2MessageConverter cannot find `_type` field even though it exists

I'm using Spring boot to receive JMS message and cURL to send it. Here's the Spring config: @Bean public MessageConverter jsonJmsMessageConverter() { Mapp

Discord onGuildMemberJoinEvent is not working

I have this problem with Discord JDA, and I'm completely frustrated about it. I hope you can help me. The problem is my console won't print a message when a use

How to add exported label in manifest when there is no activity tag in Android Studio?

in my Manifets.xml file I have no <activity> tag and I am trying to add the exported = true but I don't know how. Is there a way? Here is my manifest: <

Spring data: DeleteAll and Insert in same transaction

I am trying to achieve below native query logic using hibernate (Spring JPA). But save(Iterable) throws exception and rollback the entire transaction if one of

Postman is returning a 404 error on my Spring Boot API

I've built a spring boot rest api. However, when I try to test it in Postman, I am getting a 404 error. I have linked the code below. Please note that there

Is it a good or bad convention to update entity / row without calling save() in hibernate / spring-jpa?

Recently I found it not necessary to call repository.save() if within a @Transactional block. Hibernate / Spring-JPA will update row automatically when exiting

Error: Static mocking is already registered in the current thread

Junit test case getting failed: existing static mocking registration must be deregistered Test class: @RunWith(MockitoJUnitRunner.class) public class DeleteRe

Limiting max. concurrent FTP client connections in Java

I was wondering if there's a Java FTP client library, that can limit the max. concurrent connections or if there's a feasible way to implement this feature arou

Java Maven Project "Source option 5 is no longer supported. Use 6 or later."

I'm following a PluralSight course, "Spring Framework: Spring Fundamentals" by Bryan Hansen. I've followed the demo precisely (I believe) but am getting the err

How to extract response header & status code from Spring 5 WebClient ClientResponse

I am new to Spring Reactive framework & trying to convert Springboot 1.5.x code into Springboot 2.0. I need to return response header after some filtering,

Why does GLES20.glCreateShader always returns 0?

I'm trying to make an OpenGL ES app in android using java and I have run in a major issue: GLES20.glCreateShader(type) (type beeing GLES20.GL_VERTEX_SHADER or G

Apache Kafka - Implementing a KTable

I am new to Kafka Streams API and I am trying to create a KTable. I have an input topic: s-order-topic, which is a json format message, as shown below. { "curr

How to load test soap api using jmeter

How to load test soap api using jmeter 4.0 , multbinding The follow: example for soap request ::

Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain

I have a spring boot project here: https://github.com/jcasbin/jcasbin-springboot-plugin. I encountered the following error in Travis CI: shell 3.43s$ ./mvnw in