Category "java"

How to exclude referenced libraries from being exported when you export jar in VS Code for Java project (no build tool)

I have a Java Project for a JavaBean (multiple classes in a single project) with no build tools. In eclipse, I can export this project as JAR and I can select t

context.createDatabase is not finding in preferences DataStore Android

I've just implemented Preferences by Android DataStore but I can't find "context.createDataStore" I added this dependency below implementation "androidx.datas

How to identify the source of a context object in android java?

Overview I am working on android application in java. I have Products which can be viewed as a list by customers and vendors. Problem I want to be able to utili

Is there a @LastAccessedTimestamp in JPA

I want to store the last read time in a Date column when ever someone tries to load or fetch(select query, findBy methods) a entity I had a look at @PostLoad as

Make String.format("%s", arg) display null-valued arguments differently from "null"

Consider the custom toString() implementation of a bean: @Override public String toString() { String.format("this is %s", this.someField); } This yields

My PrepareInterceptor is being executed many times with null fields

I'm trying to use my PrepareInterceptor to see if my B2BUnit is receiving addresses, if not I want to set the B2BUnit as not active. This is my code; @Override

cannot delete list elements

I am making space invaders in Java. I am trying to get lasers to work but whenever I remove a laser the timer (that the code is in) stops. I don't understand th

Cannot align in a cell the text on the left and Icon on the right

I am trying to achieve a very simple thing, I tried different options but none seems to work. I have a simple JTable, in a column I use JLabel in order to show

On a Sunmi K2 Terminal how can I print (on the build-in printer) something using WinDev Mobile?

I'm using a Sunmi K2 POS Checkout Terminal running with Android 7.1.2 I'm developing a POS software with WinDev for Mobile 26, I'm already displaying some windo

Android Studio app crash when paho mqtt eclipse client connect [duplicate]

My Android app keeps crashing only in Android 12 when i want to connect to the mqtt server. What can i do. I tried this solution:Targeting S+

Return DTOs in the controller

I have an Operation service that has a list function that returns a list of OperationDTO however when the controller calls this function the list returns null d

How do I properly catch and handle PoolInitializationException in Spring Boot Application?

I'm writing a Spring Boot 2.6.3 app with a HikariDataSource created programmatically (so I can control names, timeouts, etc.). The interface method is used by a

Are query results cached by Java/Hibernate?

Our codebase has a lot of examples of the following code: singleResult = q.list().isEmpty() ? null : q.list().get(0); and I'm currently in the process of repla

Are query results cached by Java/Hibernate?

Our codebase has a lot of examples of the following code: singleResult = q.list().isEmpty() ? null : q.list().get(0); and I'm currently in the process of repla

JcaPEMKeyConverter is provided by BouncyCastle, an optional dependency. To use support for EC Keys you must explicitly add dependency to classpath

I have a simple Flink streaming app. It runs well in a cluster created by start-cluster.sh command. Now based on the Flink tutorial, I hope to deploy it in appl

JcaPEMKeyConverter is provided by BouncyCastle, an optional dependency. To use support for EC Keys you must explicitly add dependency to classpath

I have a simple Flink streaming app. It runs well in a cluster created by start-cluster.sh command. Now based on the Flink tutorial, I hope to deploy it in appl

How to send message from "Activity" class to a customize layout

I am trying to develop a bluetooth app. I have a class called "ConnectionManagement" which implement the "connect/accept" and "read/write". The information i ge

Install OpenCV on Mac Catalina

I am trying to install OpenCV on my Mac using this tutorial: https://medium.com/macoclock/setting-up-mac-for-opencv-java-development-with-intellij-idea-fd2153eb

Pojo Conversion with HibernateMapping & Jaxb

I have two Pojo classes, one for hibernate mapping and one for jaxb. So I get a List<CarA> using Criteria.list() and I would like to transform it into a L

Getting "Couldn't find class" error in mule application 4.3.0 after deployment

I have created a Mule 4.3 application which invokes a non static Java method. The application is getting built and deployed successfully but I'm getting a "Coul