Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

When handling user input through Scanner(System.in), you can use System.setIn() to automate user input. Like this: package edu.ntnu.idi.idat; import java.io.ByteArrayInputStream; import java.io....
Lucy's user avatar
  • 83
2 votes
1 answer
47 views

I'm working on a Java project where I need to write a large number of lines to a file. I know BufferedWriter can improve performance compared to writing character by character, but I am unsure about ...
Ahamed Shahif's user avatar
-2 votes
1 answer
37 views

Body: I am trying to solve the “A Very Big Sum” problem on HackerRank using Java. The task is to sum large integers (long values), but my output is not matching the expected answer. Here is my code: ...
Anurag Singh's user avatar
2 votes
1 answer
91 views

I have 2 files: foo.c: #include <stdio.h> int Main(int a) { printf("A%dB",a); } int main() { return Main(1); } bar.c: extern int Main(int); int main() { return Main(2); } ...
Stas Badzi's user avatar
-2 votes
0 answers
28 views

I am integrating the Mesibo Android SDK (version 2.7.19) into my Kotlin application. I need to implement the Mesibo.MessageListener interface to receive real-time messages, but I am facing a ...
user3606728's user avatar
-4 votes
0 answers
61 views

public class Test { public static void main(String[] args){ int x = 2, y = 5; int exp1 = (x * y / x); int exp2 = (x * (y / x)); System.out.print(exp1 + “ , ”); System.out.print(...
gaurav verma's user avatar
0 votes
0 answers
41 views

My VoIP Android app shows a full-screen incoming call UI using Android’s full-screen intent (FSI). On Samsung Android 16, the FSI works perfectly when installing the debug build — but fails completely ...
Henrik's user avatar
  • 71
1 vote
0 answers
64 views

I am trying to use some Java audio code that worked back in 2019. I am now using the Eclipse IDE with JavaSE-21 running on Windows 11. The following code is not working: AudioFormat af = ...
JavaLatte's user avatar
  • 396
-1 votes
1 answer
71 views

I have two classes: Student and Group. Student attributes: private String registrationNumber; private String firstName; private String lastName; private Date dateOfBirth; private String password; ...
Mohamed Selmi's user avatar
0 votes
0 answers
46 views

I have a Java service that relies on a dependency jar that I have modified. Within the dependency I have updated 2 different sections of code for unrelated functionality. I have updated the version of ...
Timbuck's user avatar
  • 423
1 vote
1 answer
104 views

I am trying to open to open 10K+ connections to a server, but my app stops at 8K connections when looking at the server logs. When using two remote servers it will struggles when reaching between 8K ...
davidto's user avatar
  • 11
1 vote
0 answers
89 views

I have resurrected a program written in Java using Eclipse: I last worked on it in 2016. I am now using JaveSE-21, and this code no longer works- the returned URL is null. String name = "res/...
JavaLatte's user avatar
  • 396
-4 votes
0 answers
40 views

What are vulnerabilitites can occur by this and prevention tech in code level ?
Aadish's user avatar
  • 1
0 votes
1 answer
60 views

I'm not sure if this is a MongoDB issue, an issue with the mongo-java-driver or if I'm doing something worng. The issue is that MongoDB can behave differently in case there is a $eq operator or if a {...
the's user avatar
  • 361
1 vote
0 answers
55 views

I'm working on a JavaFX application that requires Java 17+, which only supports 64-bit operating systems. I'm using the launch4j-maven-plugin to create an EXE file, and I need to ensure that when ...
Lson's user avatar
  • 327
0 votes
1 answer
78 views

I am trying to make an app for android, just a small little "Hello World" app to assess how it all works. I have tried on numerous occasions to get gradle to wrap the app but I just keep ...
user31958440's user avatar
0 votes
1 answer
60 views

I have something like this: String data = new Gson().toJson(myCoolObject); myCoolObject has a HashMap. The resulting string ends up containing not just the keys and values of the map, but also the ...
Silver Hyangiraikyo's user avatar
1 vote
3 answers
107 views

I am doing the learning on Broadcom's Spring Academy to be up to date with the latest best practices. I bumped Spring Boot to 4.0.0 instead of the 3.0.0 on Spring Academy. But I am having some issues ...
Jeremy Lanssiers's user avatar
-6 votes
1 answer
84 views

In a class that has a bunch of functions, should I be making a separate private method specifically for formatting or should I just be formatting in every function that requires a string to be ...
Fatko's user avatar
  • 1
0 votes
0 answers
34 views

I trying to setup cooperation of gateway and authorization server. help me to find error in the program, when i authenticate me and enter to web authentication form username=admin and password=1 i ...
Snilspefad's user avatar
2 votes
0 answers
65 views

I’m upgrading an old Eclipse setup and ran into a strange issue with m2e workspace resolution. I moved from Eclipse 2021 to Eclipse 2025. I created a completely clean Eclipse installation and ...
toreitc's user avatar
  • 21
0 votes
1 answer
63 views

I’m coming from IntelliJ and I’m used to the “Copy Reference” feature, which lets me copy a fully qualified reference to a method, such as: com.mycompany.project.service.UserService.getUserById I’m ...
Hamza Belmellouki's user avatar
1 vote
0 answers
52 views

I have the below code (whole code is here) that polls a queue for runnables and parks itself if the queue is empty. public void waitAndDrain() throws InterruptedException { throwIfInterrupted(); ...
Kannan J's user avatar
  • 225
0 votes
0 answers
30 views

I'm starting an async-process through a REST request. As soon as the REST requests returns, I'm losing the MDC context inside my async execution code. I tried to "copy" it over with ...
Daniel's user avatar
  • 906
0 votes
0 answers
50 views

I'm using an old version of Android Studio, 3.1.6. This error appears when the gradle project sync failed. I also have a new version of android studio installed, I dont know if this could be related, ...
sii desarrollo2's user avatar
0 votes
1 answer
72 views

A year ago I created an Eclipse project (Eclipse 2020-06, Java 8, Win 10) that uses the GIS LAStools libary to e.g. extract data from a couple of files. I'm now using Win 11 on a different PC and want ...
Neph's user avatar
  • 2,013
3 votes
0 answers
109 views

I have a Java application that calls a native function. That native function contains a loop, and in each iteration it launches 10 threads and waits for them to complete. Each thread performs a number ...
Daniel Junglas's user avatar
0 votes
1 answer
88 views

ThreadA getfield Stop.flag is false. At a certain point, another thread modifies Stop.flag to true, but ThreadA getfield Stop.flag always returns false. I don’t understand: Under the CPU MESI protocol,...
杨尚山's user avatar
0 votes
1 answer
75 views

Can you intercept JToggleButton clicks, making the selected property change conditional? If you add ItemListener or ActionListener, you can't veto the change, it's already happened. Switching the ...
Sergey Zolotarev's user avatar
0 votes
1 answer
108 views

I’m building a Spring Boot REST API and I’m stuck on an issue that I can’t figure out. I have a simple POST endpoint that should receive a JSON payload and map it to a DTO, but every time I call the ...
FrJ's user avatar
  • 1
1 vote
1 answer
126 views

With Spring Boot 3, I created a @ConfigurationProperties record with @NotBlank validation to manually set the base URL on the RestClient that is passed to the HttpServiceProxyFactory For example: @...
Wim Deblauwe's user avatar
  • 27.2k
0 votes
0 answers
32 views

I have deployed jasperserver-pro.war in Wildfly deployments folder and trying to start the server. But I am getting lot of WARNING server logs and I am not able to start the server.These are the ...
Sudharshan Reddy's user avatar
0 votes
0 answers
37 views

I'm building an Eclipse plugin for code completion using the Hugging Face API. My plugin sends a prompt to the endpoint: https://router.huggingface.co/hf-inference/v1/chat/completions I replaced the ...
kiruba T's user avatar
0 votes
0 answers
39 views

I’m trying to connect my React frontend (hosted on Azure Static Web Apps) to my Spring Boot backend (hosted on Azure App Service), but the CORS preflight request is failing with HTTP 403. When I run ...
tjDoe's user avatar
  • 1
-3 votes
0 answers
47 views

I have two arrays (one going from 0-49 listing every US state, and another one going from 0-49 listing the US capitals.) and I need to binary search the second array to match a selected US state to ...
Waluigi Apparition's user avatar
-1 votes
0 answers
58 views

ProcessBuilder process3 = new ProcessBuilder( "openssl" , "req", "-new", "-key&...
Sundar D's user avatar
1 vote
1 answer
106 views
+50

I'm writing a custom Maven plugin for building a Flatpak from a Java project. In a Maven mojo I understand we use @Parameter annotations to parse pom.xml file configurations. For example: pom.xml: <...
CraigFoote's user avatar
-3 votes
0 answers
76 views

Im making a presentation as homework about it, there's barely any information of it, i been working with chatgpt and some youtube video, my question is, whenever i write same numbers, for example, ...
AV_Dev's user avatar
  • 1
0 votes
1 answer
70 views

I want to use HTTP Service Clients with Spring Boot 4, but using Protobuf instead of JSON. How can I configure this?
Wim Deblauwe's user avatar
  • 27.2k
0 votes
0 answers
46 views

I'm having random data missing/not showing up in BigQuery issues. I would seemingly write data without issues, but SELECT * would return nothing. The control panel shows no errors. None of the quotas ...
Buffalo's user avatar
  • 4,082
2 votes
1 answer
87 views

I am working on an application where it dynamically generates and executes some Spring Expression Language (SpEL) expressions. I am facing a few performance issues, and after tracking it down a bit, I ...
Manas Ranjan Das's user avatar
-3 votes
0 answers
63 views

I am trying to create a Spring aspect around method, but it is not getting called. In my GeoLocationUpdateService.java: @Autowired private GeocoderService geocoderService; ... geocoderService....
Axion's user avatar
  • 1
1 vote
1 answer
92 views

I created a custom validator called @UniqueElementsById which I am applying as an annotation to Service method parameter like: public interface MenuDetailService { List<MenuDetail> ...
Guppy_00's user avatar
  • 317
1 vote
1 answer
120 views

This may be a case where things are just inherently difficult, but I've run into a roadblock. I'm working on a simple image to ASCII converter, and instead of writing to the console, I'd like to ...
Matt Lindsey's user avatar
0 votes
0 answers
55 views

In Java, having two interfaces: public interface SomeAbstractResult {} public interface SomeInterface { Collection<SomeAbstractResult> someMethod(); SomeAbstractResult someMethod2(); } ...
zajer's user avatar
  • 842
0 votes
1 answer
83 views

I have tried using both base class and interface and in both instances I am told a constructor that takes my arguments does not exist. I have two classes that are related to each other and I want to ...
horsemeat's user avatar
-4 votes
1 answer
60 views

terminal ss i am using the default intellij theme but inside the terminal colors of the font i type and the response i get are a white pale yellow color which is often hard to read while testing or ...
Hardik Kumar's user avatar
0 votes
0 answers
40 views

How do I sent an email in Java so that when Outlook displays it as a notification it will automatically show a "Copy" button like when logging into ChatGPT? Here is what I have tried. It ...
gordon613's user avatar
  • 3,042
-1 votes
0 answers
59 views

I have a class with only a main(), but inside that many variables are there. Should I include all those variables inside the main function into class diagram or just specify only: Class name nil +...
Yumna Nizar's user avatar
1 vote
1 answer
99 views

I am trying to solve a coding problem where I need to repeatedly double a number (original) as long as it exists in an integer array. To make the lookup faster, I am inserting all elements of the ...
Gurkirat Singh's user avatar

1
2 3 4 5
38366