Category "java"

How do I manipulate a CSV file?

Create a program in Java that will read the CSV file and compute the Final Grade of the student using the computation below: Lab Exercise * 30% + Long Quiz * 30

can a kafka consumer filter messages before polling all of them from a topic?

It was said that consumers can only read the whole topic. No luck doing evaluations on brokers to filter messages. It implies that we have to consume/receive a

How to configure port for a Spring Boot application

How do I configure the TCP/IP port listened on by a Spring Boot application, so it does not use the default port of 8080.

Converting MultipartFile to java.io.File without copying to local machine

I have a Java Spring MVC web application. From client, through AngularJS, I am uploading a file and posting it to Controller as webservice. In my Controller, I

Extract string between the tags in Java

I have string like below Msg_Begin Some message1 Msg_End Msg_Begin Some message2 Msg_End Msg_Begin Some message3 Msg_End And want to get the message between

Reading a large compressed file using Apache Commons Compress

I'm trying to read a bz2 file using Apache Commons Compress. The following code works for a small file. However for a large file (over 500MB), it ends after

Jackson/Kafka LocalDateTime serialization not working properly

We have a very strange/intermittent issue with kafka and jackson. We have a dto defined which has 4 date field startdate, enddate and a embedded metatdata class

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