1,918,281 questions
0
votes
0
answers
25
views
How to check the online/offline status of a POS Printer in Java?
I am developing a Java application that prints receipts to a DGT POS Printer Speed Line 300-UL. The printer is connected via Ethernet (network), not USB.
I want to implement a feature where the ...
0
votes
0
answers
15
views
Android Java - UI does not load intermittently
Im developing a app in Android using Java.
When i run the app in android studio the UI does not load completely, i can see the bottom navigation and toolbar but the fragments do not load 90% of the ...
-2
votes
1
answer
84
views
How to calculate mirrored sum of an array in Java?
I am trying to calculate the sum of mirrored elements in an array using Java.
A mirrored element pair is formed by pairing the first element with the last, second element with the second last, and so ...
Best practices
0
votes
2
replies
31
views
Representing 4 types of Card Templates Adhering to DDD
I have an Entity Called CardTemplate. For physical cards, there will have to be a pattern chosen to physically print the card. And based on the two types of operations that the cards are allowed to do,...
1
vote
0
answers
67
views
Java Swing Invisible Image
Context:
I'm trying to make an app with java swing, however when trying to add a background to the Login Page, the image does not show up. It is there and moves other JComponents when adding a layout ...
0
votes
1
answer
44
views
Android Java Surfaceview, declaring and hiding
I have a main activity with a button. When I press the button, a hidden SurfaceView becomes visible and an animation shows. It's working really well, but I have two problems.
First, what is the proper ...
Advice
0
votes
4
replies
44
views
Lower Bounded Wildcards: is it about superType or subType
Oracle documentation mentioned it clearly.
a lower bounded wildcard restricts the unknown type to be a specific type or a super type of that type.
To write the method that works on lists of Integer ...
0
votes
0
answers
13
views
Even when connecting Web3j via WebSocket, I can’t receive blocks instantly
I made sure the RPC URL definitely starts with wss, but Web3j still keeps fetching blocks at specific intervals instead of receiving them in real time.
Do I need to call a different method?
My Web3j ...
-1
votes
0
answers
20
views
Firestore only updates when the activity using it is accessed through a specific Android activity [duplicate]
I'm working on an Android app where users can add and remove restaurants from their favourites via the RestaurantPage activity. When I access the RestaurantPage activity from the UserFavourites ...
0
votes
0
answers
34
views
Why does RestTemplate, starting from Java 21, run on a different thread even without virtual threads and without @Async, and why does MDC get lost?
i recently migrated from java17 to 21. I use logback MDC to log http request and response. each http request may lead to execute several resttemplate sync call. i use mdc to generate UUID as traceId ...
0
votes
0
answers
60
views
How to List pdf filenames [duplicate]
I cannot get a list of files ending with .pdf, I have tried everything, it lists everything else in the folder, except for the pdf's, what is wrong with this. The program then displays the list in a
...
1
vote
1
answer
47
views
Spring WebClient takes too long to process the first request — subsequent calls fast
I'm using Spring WebClient in my Java application to authenticate with Keycloak.
The issue I'm facing is:
The first WebClient request takes a long time (5-9 seconds), but all subsequent requests are ...
3
votes
1
answer
48
views
Java 17 Documentation Tool causes failed UnknownElementException for record parameter
I am using the javax.tools.DocumentationTool to parse the Documentation of my source code base. I am using Java 17 jdk to run. It is triggering an javax.lang.model.element.UnknownElementException ...
-1
votes
0
answers
59
views
Hibernate 7 and H2 2.4.240 compatible issues
When upgrading H2 to the latest 2.4.240, the H2 specific tests failed with the following errors:
insert into posts (content,created_at,slug,status,title,version,id) values (?,?,?,?,?,?,?) [23514-240]
...
-1
votes
0
answers
32
views
I'm unable to implement auto focus in Iframe [closed]
I'm designing custom automation report(Playwright with Java using Junit). Encountering issue where I'm unable to implement "auto focus" when I click on the scenario in the table. Focus ...