Category "java"

UNDO/REDO for JTextArea

I am writing a text editor. And here I ran into a problem. I need to implement UNDO and Redo function for JTextArea. For this I use UndoManager. But, if I cance

Cancel multiple Retrofit API calls at once

Past few days I am searching for a Retrofit2 feature. Is there any option or way to cancel multiple API calls at once, requested from a client? For example, I h

Clojure - compiling project with Java classes that are potentially not available

I am wrapping a java library in Clojure. Depending on the java library version, some classes exist or not, so my library can fail to even compile if it can't fi

Can I include Java constant value in AsciiDoctor document?

For example, lets have a Java constant in some class public class MyClass{ public static final String ENDPOINT="http://example.com" } and lets try to describ

Clojure - compiling project with Java classes that are potentially not available

I am wrapping a java library in Clojure. Depending on the java library version, some classes exist or not, so my library can fail to even compile if it can't fi

What is the difference between maven compiler plugin and maven toolchains plugin?

I had to integrate some legacy code into my maven build, so I used the maven-recommended toolchains plugin to change the java version: <plugin> <gr

Spark: unable to load native-hadoop library for platform

I am trying to start with Spark. I have Hadoop (3.3.1) and Spark (3.2.2) in my library. I have set the SPARK_HOME, PATH, HADOOP_HOME and LD_LIBRARY_PATH to thei

How do I fill in the input type= "time" field in Thymeleaf?

The Spring-Boot + Thymeleaf project does not fill in the input type= "time" field When opening the html form. That's how it works: <input type="time" class="

How to use ilike and % in createSQLQuery in hibernate java

I have made a sql query now i need to add search from it. it needs to search from userfullname the given keyword query is working in postgresql but it is not wo

Minecraft Forge FMLClientSetupEvent fired on Server?

As stated in the Title I think that an FMLClientSetupEvent is Fired on a Forge-Minecraft dedicated Server. Forge Versions should be the same. All in all, this l

Quarkus upgrade complaining regarding vertx thread in tests

I have recently upgraded quarkus to 2.9.0.CR1 and am now having issues in some of my tests I am using reactive panache in this, through the repository pattern.

error: cannot find symbol: method rotate()

I must write a constructor that takes in a 27-letter sequence and a char that "rotates" the char sequence until the first char in the sequence matches the given

Reading input from 2 files and writing to a third file in ascending order

I have 2 files that each contain a series of ordered numbers, separated by spaces (" "). Write a program that produces a third file that will contain the ascend

How to recursively insert elements into a binary tree and keep it balanced java?

I am doing a project for class and am stuck on trying to develop this method. Would anyone be able to give me an example? The instructions for the method are be

Structured Streaming to Save JSON to HDFS

My Structured Spark Streaming program is to read JSON data from Kafka and write to HDFS in JSON format. I am able to save JSON to HDFS but it saves the JSON st

Duplicate handling strategy error with gradle while using protobuf for java

I am using the below configuration build.gradle plugins { id "com.google.protobuf" version "0.8.17" id "java" } group "de.prerna.aws.tests" version "1.

How to read each char sent by Putty at Java server?

After forcing off the "Local line editing" at Putty (Raw mode), all chars typed are sent to the server without the Enter (checked it with Wireshark). I have thi

How to make resource files privatly and locally accessible to the application with app.yaml in GAE?

In appengine-web.xml we have <resource-files> tag to make resources files accessible to the application at runtime but not public, but in the new app.yaml

How can I access and iterate through an ArrayList of Linked list element?

I am trying to write a code of adjacency list implementation of the graph ADT. private ArrayList<LinkedList<Integer>> adjLists ; but I don't know

Problems with SmbFile.createNewFile() behaviour

I wonder what the catch is with createNewFile() in recent versions of jCIFS and ng (SMB2 specifically). The documentation says it should fail on execution if a