Category "java"

Java CompletableFuture allOf approach

I am trying to run 3 operations in parallel using the CompletableFuture approach. Now these 3 operations return different types so need to retrieve the data sep

Large Paragraph where in each line if it exceeds certain length , should go to new line using Java

Need help on solving below usecase using Java where in the below paragraph A@123@456789@10111213 B@123@456789 C@123@456789@101112131415 D@123@456789 E@123@4567

How to set 'charset' for DatumWriter || write avro that contains arabic characters to HDFS

Some of the data contains value in Arabic format, and when the data is written, reader code/hadoop fs -text command shows ?? instead of Arabic characters. 1) Wr

XML file option not visible in select wizard

I have created a Java project in eclipse. Under that I have created a source folder naming "Resources". I want to create an XML file under that Resources folder

foreign key constraint failed (code 787 sqlite_constraint foreign key)

I have been using the Android Studio App for about a month now,in order to create a project for a university subject. Unfortunatelly,I came across a problem whi

How to make a custom context action in Intellij IDEA using a plugin?

I wanna make a simple context action (the one that appears when you click Alt+Enter) using a plugin. But I can't figure out the group I need to add and how to i

Exception never seems to get thrown when an AxisFault is found

I have this catch statement: } catch (Exception e) { if (e instanceof AxisFault) { LOGGER.info("AxisFault: " + e); if (((AxisFault) e).getFa

Can't access MySQL database from exe but works fine in IDE and jar

I have a small GUI application that is supposed to access a local MySQL database. It works fine from my IDE and jar file but once I use the jpackaging tool to t

Rhapsody Java API to get the URL of a remote artifact element

I am trying to create a OSLCLink using this Java API: void createOSLCLink(java.lang.String type, java.lang.String purl) ex: cellElement.createOSLCLink("TRACE",

Gradle 7.4 fails with Applet been deprecated and marked for removal

Eclipse is hanging on me, so I reverted to a gradle build. Gradle classes fails with the error message below. I do have a gradle.properties file in the project

Polymorphism with instance variables [duplicate]

Here are three classes that I wrote: public class Shape { public int x = 0; public void getArea() { System.out.println("I d

Is there are way for CronTriggerImpl to get how many times it have been triggered

we can use SimpleTrigger getTimesTriggered to know how many times this schedule have been triggered, for CronTriggerImpl, is there a similar way to achieve this

Mockito Capture argument of a Constructor in mockConstruction

I have the following classes: public class Bar { private final Listener mListener; public Bar(Listener listener) { mListener = listener; } } p

Get text inside brackets along with splitting delimiters in regex java?

I have a multiline string which is delimited by a set of different delimiters, A Z DelimiterB B X DelimiterA (C DelimiterA D) DelimiterB (E DelimiterA F) Delimi

Spring environment variable values computing

Can I somehow use environment variable to set a properties value, but using computing, something like this: test2: ${TEST+1:2} test: ${TEST:1} As you can see

Hibernate- Liquibase throwing exception : java.lang.UnsupportedOperationException: The application must supply JDBC connections

I am trying to generate changelog based on DB and Entity class My Liquibase properties file is as follows `url=jdbc:h2:mem:testdb changeLogFile=classpath:/db/ch

Profiling memory leak in a non-redundant uptime-critical application

We have a major challenge which have been stumping us for months now. A couple of months ago, we took over the maintenance of a legacy application, where the la

Just curious - ParcelFileDescriptor's getStatSize() returns file size in MB not MiB, why is Google making this complicated?

Phone's File manager shows the size of a randomly selected images as 7.09 MB. Android's ParcelFileDescriptor's getStatSize() method returns 7093426 bytes. This

I have created a file and after some operation trying to delete it using file.delete(), but it is not working

I have created a file and after some operation trying to delete it using file.delete(), but it is not working. Below is my code. public boolean isSafe(Multipart

How do I add an external library (Apache Commons Lang) to an Android Studio app manually?

I know how to work with Apache Commons Lang 3 library in an Android Studio app by implementing it in the build.gradle file using implementation 'org.apache.comm