Category "java"

Why there is still error after i import the org.apache.commons.io.IOUtils? How to resolve them and how to add the import properly?

After i import it stills remain error? Where should I download the the import? How to import? import java.util.Scanner; import java.util.*; import java.io.*; i

Hibernate parameter binding issue with lists

I have the following method in one of my repositories @Query(value = "select resource_id from tag where resource_type = :resourceType and value in :tags", nativ

unable to write into different logs for different threads using log4j2

I'm trying to write logs into different files for each Thread/ThreadGroup. My code is creating different files for each thread, but it writing all other threads

Automatically register users in resource server

I'm trying to configure spring security with oauth2, however I am new to this topic and ran into a problem. I have a spring backend and an angular frontend. I u

Android Scoped Storage Permission for Download Folder to Download PDF

I have an app that download specific pdf files using streamig Retrofit. I am upgrading my app targeting android 11. I have gone through many online documents an

How to open fragment from the click of the notification?

This is my onMessageReceived method. I am getting data from notification i want to open fragment when i click on this notification and get the data from this.

Calling a servlet programmatically when a specific criteria is met

I am working on a JSP app and I have successfully created an HttpServlet that allows user to download a file on the browser. I have tested it by calling the ser

How to use log4j.xml for spring boot + log4j2 dependency

I have a log4j.xml with a customized appender like: <appender name="console" class="com.example.MyAppender"> <layout class="org.apache.log4

How to call an event handler function written in one JFrame in another jframe?

How to make function selectRecords("select * from Seva_Details"); written in a JFrame accessible in another, separate JFrame? public void selectRecords(String S

Is it possible to run Java16 code on Android

I know Java 16/17/18 is not compatible with java 8 (android), but is-it a way to generate byte-code for android to execute the program on my phone? Or trans-cod

Hide autogenerated content of XML annotations in Springfox Api-docs

I am writing a Gradle project with Springfox-swagger-ui 3.0.0 to present nice swagger UI with Api documentation. compileOnly "io.springfox:springfox-swagger-ui:

Why my uninstalled jdk version still shows in java -version?

In my project which need jdk 1.8, but there is default openjdk 17 in my mac. So I remove it from Library/Java/JavaVirtualMachines. But when I run java -version

How do I add user input from JTextfield to Text file

I've been trying to create a simple register form using GUI and I am having a hard time in saving the user inputs from JTextfield to a txt file. So far this is

Why Maven or Gradle come into picture? [closed]

I know core Java, I want to learn Maven/Gradle. But I want to know why maven or gradle is required. is there any way to understand the problem

Animating a specific line of a textview using android Animations

I am wondering if it is possible to perform a fade out/fade in animation on a specific line of a textview. I have a two line textview which I would like the "ti

How can I map with modelmapper some conditions?

I have some Game entity that I want to map in GameDto. In Game I have another Game field basedOn. In GameDto I have basedOnName, basedOnId and basedOnCheckBox f

JedisCluster configurations and how it maintains the pool of connections

I have recently started using JedisCluster for my application. There is little to no documentation and examples for the same. I tested a use case and the result

Android ClipboardManger work in background

Is there any way that I can run ClipboardManger in the background on Android 12 I developed a clipboard application where any text I copy it, It will save in my

How to move failed testcase code from @Aftermethod to TESTNG Listener?

This is the working code to capture screenshot for failure testcases in Extent reports I am trying to put inside TESTNG listeners: @AfterMethod public void tear

Trouble with replacing a variable in a txt file with user input - using java in eclipse

I am trying to replace one word in a txt file with a new one from user input (Using Java in Eclipse IDE). For example: My txt file is as follows: Jacket 12 59.9