Category "java"

How to add an ImageIcon in java? this code is not working

I want to add an ImageIcon to the Panel, but I got this Exception ( java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "locat

How to change MethodHandle arguments after being inserted?

Suppose you have MethodHandle and some arguments have been specified, how to change those arguments after being set? import static java.lang.invoke.MethodType.

Using COM4J to create excel file

I am receiving a null pointer exception when trying to launch an instance of excel to export data to. I have tried adding the newest version of COM4J.jar to my

How to improve performance of JavaFX graphic drawing?

Situation : I've created an app which needs to draw simple rectangles (1x1 - 3x3 size) depends on some variables stored in array of corresponding size (900x900

Is there BlockingMap as BlockingQueue in java?

I'd like to have one BlockingMap data structure which is very similar to BlockingQueue. The take method of BlockingQueue will wait there until element is availa

InfluxDBIOException: java.net.SocketTimeoutException: timeout

I'm using Influx Db java wrapper and adding data in influx db for every 5 seconds with a retention policy of 30 days. When I'm trying to query the data by send

how to add to settings.gradle in cordova

This is the same question I am to new to comment on it to see if he found a answer Cordova is generating a new settings.gradle file when you run "cordova build

Java MIDI: Connecting MIDI Keyboard to Default Synthesizer

I gotta a MIDI Keyboard. All I want is an example of how I can setup the default software synthesizer to play sounds as I play the Keyboard. package cleffsgam

IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type {http://www.w3.org/2001/XMLSchema}array is referenced but not defined

I am getting IWAB0399E Error in generating Java from WSDL: java.io.IOException: Type {http://www.w3.org/2001/XMLSchema}array is referenced but not defined' whi

Using AEM sling rewriter to replace one string in html with another

I am new to using Sling rewriter however I would like to replace all instances of one string with another string (this is a simplified version of my use case bu

How do you close a AsynchronousSocketChannel cleanly?

My server uses a AsynchronousServerSocketChannel that listens for client connections using a CompletionHandler. When a client connection is accepted, the Async

How do we implement q Params in Helidon SE

I am new to Helidon SE and would like to know if there is a way to implement q params in REST service created via Helidon SE. Any help in this regard is truly a

Why does easywsdl prepend each class with 3 random characters?

I have been using the easywsdl Android Studio plugin to autogenerate ksoap2 code based on a wsdl. Each time I generate the code, easywsdl prepends 3 random upp

Micrometer - Prometheus Gauge displays NaN

I am trying to generate Prometheus metrics with using Micrometer.io with Spring Boot 2.0.0.RELEASE. When I am trying to expose the size of a List as Gauge, it

How to install and setup Cucumber jar files in Eclipse for WebDriver Testing

I am fairly new to Java, eclipse, Cucumber and Selenium. I am just beginning to learn these. Overall, I am fairly new to StackoverFlow. I got problem that I am

Gradle can not compile the code with the generated sources by annotationProcessor

How to make the gradle build/compile a project using generated source by annotationProcessor? I have a project with 2 modules app-annotation -> is a module t

How to use graaljs ? Is there a place where to get a .jar file/files?

I use Java 8 and I use the default JavaScript Engine (Nashorn). I would like to see how it compares with the 'highly hyped' GRAAL JS. See: https://github.com

Quarkus custom test resources dir

We are using multiple source sets for tests in our project which defined in gradle like this: sourceSets { test { java { srcDir file('sr

Resolving Pageable in Webflux

I spent a lot of time to find a solution about Pageable in Webflux, unfortunately, at the time of writing this, Webflux does not support Pageable so I came up w

Hex String to Byte array conversion java

I know this question is asked a lot of times but please hear me out. Previously I have tried following methods to convert hex string to byte array. say my key