Category "java"

Tune DocLint to allow new tags in javadocs

Is there a way to tune the DocLint (-Xdoclint) to allow new tags in javadocs? Right now i get errors like: error: unknown tag: checkstyle * @checkstyle Pa

How to create Java mixins: @Slf4j

I'm trying to create a Java mixin and use the @Slf4j annotation. However intellij shows an error @Slf4j is only legal for classes and enums. import lombok.exter

Daemon is stopping immediately JVM garbage collector thrashing and after running out of JVM memory

When I build multi module java project using gradle 6.0,when I add >30 modules.Throw this error: Gradle Daemon started in 2 s 267 ms > Configure project

Split Packages: Java Modules vs Sealed Jars

Both Sealed Packages/Jars and the Java Module System disallow spliting packages across several jars. Does that mean that all packages contained within a Module

UML modelling enumeration with attributes

I would like to create an UML diagram with Java enumerations (enum), that have one or more attributes, but I am confused about how to do it. For example an enum

Getting java.lang.NoSuchMethodError: org.springframework.cglib.core.ReflectUtils.defineClass while inserting data in mongo using Spring MongoTemplate

I am trying to insert some data (List of Objects) into mongoDB using Spring MongoTemplate and I am getting an exception: 14:08:04.430 [main] DEBUG org.springfr

GraalVM Java on truffle - NullPointerException from NFIContext.getBackend when executing Java code

I'm trying to run Java code dynamically inside a Java application using Truffle from GraalVM, without success. Settings I'm working on MacOs 11.5.2. I've follow

CteInsertStrategy can only be used with Dialects that support CTE that can take UPDATE or DELETE statements as well

Hibernate 6.0.1 with PostgreSQL JDBC driver 42.3.5 causes the following exception: java.lang.UnsupportedOperationException: CteInsertStrategy can only be used w

Spring boot ignores "ignoreUnresolvablePlaceholders" = true

I'm having a problem with my Spring Boot application ignoring my ignoreUnresolvablePlaceHolders set to true in my config.xml file. I have these options explici

Hide Java application to System Tray

I want to hide my Java application from the taskbar and for it to be visible only at the system tray. Here is a picture in case this is unclear. I tried to i

Calculate distance point to line

I'm using Mapbox for Android Java and need to calculate the distance between a drawn line defined by start and endpoint to the users current location. Any idea

Is it possible to set private static final field using Reflection in JDK 17 [duplicate]

I am trying to upgrade my application Java version from v1.8 to v17. There are some unit tests which are using Reflection to set value of priv

Error sending HTTP request. Message payload is of type: HashMap

I am failing at generating a POST message from within Anypoint Studio: What I am trying to accomplish is to send a POST to our Kykloud api endpoint with 3 key-

how to have close option in android keyboard

I don't wanna see the Enter option on my keyboard. showing close instead of Enter option. what should I do? The screenshot of my layout: my xml code :

Parallel tests in Android with cucumber, appium and testNG in java

I have 5 real devices in which I want to execute 20 tests, for example: 4 tests in each device in parallel, that is, in device 1 test 1 is executed, when the te

Oracle MAF 2.3.0 Jdeveloper 12.2.1 can't deploy applications

i'm developing an android app with MAF 2.3.0 in Jdeveloper 12.2.1 on a Ubuntu x64 OS and i have android SDK emulator running but everytime i want to deploy my a

How do I change the color of the timepicker in my Android app?

As you can see from the image below, I'm using the time picker in my app. I need to change the color but don't know how... Thanks for the help.

Swipe to refresh data using SwipeRefreshLayout in fragment?

I want my layout to be refreshed when the app starts and the data should show in and when the user swipes the data should be updated and show new data if new da

ListFragment Not displaying data from List

After I try to open the navigation drawer and go to a different tab and then go back to it. It is not showing data in a list once again. Main Activity package c

How to read/write a file in Java

I would like to replace some items in a file, based on some regular expressions. In order to do that: I read the file line per line For every line, I check for