Questions tagged [java]

Java is a high-level object-oriented programming language. Use this tag when you're having problems using or understanding the language itself. This tag is frequently used alongside other tags for libraries and/or frameworks used by Java developers.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

Can't pass arguments to java application via shortcut

Windows 10 Content of file myApp.bat @echo off set CONFIG_FOLDER=%~dp0config java -Dexternal.app.config=%CONFIG_FOLDER%\application.properties -jar lib\my_app.jar From console I sucess run myApp.bat ...
Alexei's user avatar
  • 14.7k
0 votes
0 answers
5 views

Error try to run scala but it didn`t work

Welcome to Scala version 2.10.5 (OpenJDK 64-Bit Server VM, Java 11.0.17). Type in expressions to have them evaluated. Type :help for more information. scala> [init] error: error while loading ...
Andi0905's user avatar
0 votes
0 answers
8 views

How object-to-object communication in Java works?

I am new in learning Java just finished with Methods lecture. I am working on assignment and I need to write program for Money transfer service. I have two classes, first one is CurrencyConverter and ...
Kekicbj's user avatar
0 votes
0 answers
7 views

Deny access to specfic route in web.xml - Java

I have a Java app with a React app embbebed in the same maven project. I want to block specific routes from frontend (eg: examplehost.com/#/dashboard) with web.xml security constraints but I can't. ...
Franco Moyano's user avatar
0 votes
0 answers
10 views

small fragments appearing in my jpanel inside my jframe

When I open my program, these small pieces of components appear on the screen, nothing that prevents the program from functioning normally, but aesthetically it is strange. I have no idea what it ...
Vithor Roder's user avatar
0 votes
0 answers
16 views

Difficulty Moving Multiple Circles Through JavaFx's GridPane

I am currently facing challenges while working with GridPane. My objective is to move a specified number of generated circles through the cells of a GridPane. I have 5 GridPane and in every one of ...
Jam2002's user avatar
-1 votes
0 answers
16 views

Java Program (Creating methods and using arrays) [closed]

I need help finishing this program: Your program will read and store in the entire data file, present a menu of choices to the user, and depending on the selection, call a specific method to do a ...
oStarZ's user avatar
  • 1
0 votes
0 answers
4 views

Thymeleaf not processing templates properly

I have been developing a simple project with frontend and backend for managing the university IT tickets. After implementing different approaches (and all of them working well) being the last using ...
starcat's user avatar
0 votes
0 answers
18 views

Can I make my code cleaner using Streams in Java 8

So I have a list of Merhant objects with (Merchant Code, purchase ref, ...etc). so it can be something like: 1, purchase abc, description 1, purchase cde, descr 2 2, purachase fed, desc 4 3, purchase ...
Loner shushman's user avatar
0 votes
1 answer
7 views

Should I implement different services for each thread or should I put all inside one service?

My question if it is good practice to have multiple services for different types of threads. For instance, let's say my app offers two type of features: to either host a server on the device or to ...
juvor's user avatar
  • 13
0 votes
0 answers
14 views

Redirect output and error to the same file using ProcessExecutor

I am using ProcessExecutor org.zeroturnaround.exec.ProcessExecutor, for executing a shell script in Java. The requirement is to to color code any error logs from the execution and write the output ...
a_good_human's user avatar
-3 votes
0 answers
25 views

Is it possible to manipulate systems within milisecconds? [closed]

As we know, we can edit the files on visual environment of codespaces (javascripts) in web in real time. While a file is open is it possible for someone who gained access can play with my files in ...
cedfey dsfe's user avatar
0 votes
0 answers
21 views

Nextflow Error: Not a valid S3 file system provider file attribute view: java.nio.file.attribute.BasicWithKeyFileAttributeView

I'm encountering an error while running a Nextflow process. The specific error message is related to the S3 file system provider and the file attribute view. I'm trying to run a sample dataset with ...
AWS Guru's user avatar
-2 votes
0 answers
13 views

how do I add the correct ship, star, and bullet code to my existing java code for the asteroid game?

so i think the title is clear, i will add my java code here. i know i started some of the ship code but im not sure im right: your textpackage module9andahalf; your textimport java.awt.Graphics; your ...
bogld2002's user avatar
-10 votes
0 answers
57 views

How are great softwares like office, adobe, visual studio developed? [closed]

How are great software applications developed. Its always been one of my great questions. I am a software developer in c++ but after 3 years of experience It is still vague for me that how elegant are ...
Ali's user avatar
  • 1
0 votes
1 answer
6 views

Liferay 7.4 development using SDK

SO I am getting back into portlet and service development using Liferay. I have Liferay Portal 7.4 up and running and the Eclipse Development Studio. Is there an SDK I need to download like older ...
Eric Olsen's user avatar
0 votes
0 answers
18 views

Gloabl Leaderboard Integration [closed]

I have a simple clicker game on my website, and I want to add a global leader board to it (so that users can see how they rank amongst other users). I've looked for widgets and extensions to add but I ...
Duby's user avatar
  • 1
0 votes
0 answers
14 views

How to time a ListenableFuture

I want to track how long an async process takes. My general approach for synchronous processes is to record the current time, run the process, and finally calculate and record the difference. I use an ...
kane's user avatar
  • 5,565
0 votes
1 answer
6 views

How to show the list of all file names in the SD card directory of Android device?

In my Android native Java project, I have a class, where I wanted to show the log for all the SD card directories and file names inside those folders. Here's the code: public class LogFileListActivity ...
S. M. Asif's user avatar
  • 3,507
0 votes
0 answers
15 views

How to solve java.lang.IllegalStateException: Can't configure mvcMatchers after anyRequest error?

I'm creating a Spring Boot configuration to allow/ignore HTTP requests to a specific path using the new WebSecurityCustomizer class from Spring Security 5.4 that deprecated the class ...
brunocrt's user avatar
  • 730
0 votes
0 answers
9 views

Java servlet fails to fetch data from 3rd party web servers

What is wrong with my Java servlet code that fetches 3rd-party web content? I run a free site called astronomytonight.net, for the benefit of amateur astronomers in North America. This site gathers ...
John's user avatar
  • 1,635
-4 votes
0 answers
14 views

não sei como faz esse exercício, alguém pode me ajudar? [closed]

(Classe Data) Crie uma classe Data com as seguintes capacidades: a) Gerar saída da data nos formatos, como DD/MM/AAAA 14 de Junho de 1992 b) Utilizar construtores sobrecarregados para criar objetos ...
Luiz z's user avatar
  • 1
0 votes
0 answers
24 views

Why is it showing error after windows update in vs code while Java programming

The program is lacking details, it is showing I tried- import java.lang.*; class nir4{ public static void main(String args[]){ System.out.print("hi"); } } But out> put ...
Nilkamal Sau's user avatar
-3 votes
0 answers
20 views

JavaFX styles gets destroyed and shows errors in Raspberry PI 3, but works well in windows and kali linux [closed]

When I run the jar file in Kali Linux, it works well.
ProgrammerJibon's user avatar
0 votes
0 answers
7 views

Log response body in spring cloud gateway in filterfactory class

I am trying to modify the response body which is currently gzipped text/html format. As first step i want to log it in abstract filter factory class. So far i have tried https://stackoverflow.com/...
jacksparrow777's user avatar
0 votes
2 answers
43 views

Convert a Map<String, List<Object>> to Map<String, List<ClassVariable>> using java streams

I have a class example: class Test { String id; int a; TestObject1[] someObjectArray; TestObject2[] someOtherObjectArray; } I have a map of Map<String, List<Test>> ...
iamrogue's user avatar
0 votes
0 answers
13 views

How do I properly fail a validation of spring data cassandra using jakarta validations when passed to controller?

I have the following... @Column @ContactInfo private String contactInfo; ... private static final String EMAIL_PATTERN = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,6}$"; @Override ...
Jackie's user avatar
  • 22.3k
0 votes
0 answers
24 views

Java error when generating a minecraft server

enter image description here I`ve been triying to generate the server but this error pops up every time. i tried to change the amaount of ram i use and everything. please help. Exception: java.lang....
Előd Simon's user avatar
-1 votes
0 answers
15 views

I am using Tomcat 8.5.96 and I cannot connect JDBC to my database with Tomcat. My Tomcat local server doesn't see my MySQL database problem [duplicate]

enter image description here My Tomcat local server doesn't see my MySQL database problem... <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> Connection c = ...
Dương Đức's user avatar
-2 votes
0 answers
7 views

Animations not working on all android devices

I have an issue with animations on some android devices. For example I have Infinix X6516 where all animations are working fine. Then I have 8A and there is not working a single animation. To be more ...
siflJebatkundy's user avatar
-1 votes
0 answers
34 views

How to add reference in target language for c++ constructor with references to interface in SWIG

I read https://www.swig.org/Doc4.1/SWIGDocumentation.html#Java_memory_management_objects, but it does not help. I have following interface class ApplicantMatcher { public: [[...
Štefan Bellus's user avatar
1 vote
1 answer
60 views

Looking for clarity on Thread.sleep() method

Thread.sleep() method puts the thread that is running it to sleep. thread.sleep() statement in the below code will be run by main thread, 'thread' in the below code is an user defined thread. Why is ...
Bh_04's user avatar
  • 13
0 votes
0 answers
39 views

Anonymous functions using interface with multiple methods?

What happens if Predicate<T> contains multiple methods? It's my understanding if they have the same argument signature this is not allowed. I ask because I'm considering the Comparator<T> ...
notaorb's user avatar
  • 1,967
0 votes
0 answers
24 views

Why isn't my breadth first search algorithm working correctly to solve the ladder problem?

I am taking an algorithms and data structures class and I am working on an assignment where I have to use a breadth first search algorithm to solve the word ladder problem. It's not working and I'm ...
Evan Schulte's user avatar
-1 votes
0 answers
26 views

Test method in springboot with @Valid

I have this class in a springboot project: @Service @Validated public class NovaConferenciaGatewayImpl implements NovaConferenciaGateway { private final ConferenciaMapper conferenciaMapper; ...
Fabio Ebner's user avatar
  • 2,631
0 votes
0 answers
17 views

How to fix data serial not read and return consistently

I want to return response/data from a vending machine to my Android app (Java). The weird things is whenever I debug and put breakpoint, the message/data returns in one full line, but if I run app in ...
Harizah Syawal's user avatar
0 votes
1 answer
13 views

What is the alternative function for fluent wait in selenium java?

What is the alternative function for fluent wait in selenium java? For ex.:- We can achieve assert true using if else condition, the same way how we can achieve fluent wait? Interviewer told me that ...
Cynol's user avatar
  • 1
-3 votes
2 answers
39 views

How to share data between other microservices in spring boot? [closed]

I am learning about microservices through spring boot cloud. I have 2 services authenticate and product and I call them both through the gateway, I encounter the following problem: How can the ...
Nam Nguyen's user avatar
0 votes
0 answers
11 views

How to set the log level from Spark in local mode from a Java application?

I run Spark 3.5.0 on a single Ubuntu Linux machine in local mode (no Hadoop). I build, package and execute the application with Maven, but no matter what I do, the console output from my application ...
Tristpost's user avatar
0 votes
0 answers
23 views

Validate XML against XSD which imports big enum XSD

I have an XSD which imports big XSD with more than 200k <enumeration> elements, I need to validate incoming XML against root xsd: <?xml version="1.0" encoding="UTF-8"?> ...
qweqewtwerb's user avatar
-3 votes
0 answers
21 views

Finding 3 digit armstrong numbers in Java [duplicate]

I wrote following code and Ran: public class Forloop1 { public static void main(String[] args) { int i,n,d,s=0; for(i=100;i<1000;i++){ n=i; while(n>0) { ...
Jonnalagedda KESAVA UMAMAHESWA's user avatar
0 votes
0 answers
9 views

How to disable auto instrumentation of a library but only for metrics and keep traces

When using OpenTelemetry Java agent, we get many libraries auto instrumented. It's possible to disable a library instrumentation with OTEL_INSTRUMENTATION_[NAME]_ENABLED but this disables all sorts of ...
Gaël J's user avatar
  • 12.3k
-1 votes
1 answer
26 views

How to save one-to-many entities to PostgreSQL with Spring Data JDBC?

I am trying to save one-to-many entities to PostgreSQL database using Spring Boot and Spring Data JDBC. Main application code: @SpringBootApplication public class TvApplication { @Autowired ...
my_dear_doctor's user avatar
0 votes
0 answers
21 views

How to understand how different requests are being provoked in Dev Tools?

I have a web application, the backend is on Java, while the front end is using JS, how can I understand when I open dev tools how requests are being provoked, is there a part of the code which shows ...
Lia's user avatar
  • 1
1 vote
0 answers
21 views

WebAuthn: Does navigator.credentials.create() work from localhost to another (sub)domain?

I am trying to develope the WebAuthn registration flow in Java. For this reason I got access to the privacyIDEA server from my university. Let's assume, for example, that the origin domain from my ...
user2379123's user avatar
0 votes
0 answers
17 views

Spring Boot application for Atlassian security is not starting

I have two spring boot application one is normal application which include another application as dependency. And in 2nd application I have written Jira security which needs to be added on 1st ...
user3458271's user avatar
0 votes
0 answers
16 views

How do I deploy docker compose to heroku? [closed]

How do I deploy docker compose to heroku, and I am a java microservice project, docker contains mysql, Redis and java projects How do I deploy docker compose to heroku? Is there any HeroKu tutorial ...
Aaron's user avatar
  • 1
-2 votes
1 answer
20 views

Cannot invoke equals(String) on the primitive type double [closed]

Cannot invoke equals(String) on the primitive type double this problem occuring when i try to comapare double fees with string name how to resolve it. i want to compare fees in the frontedn ie one ...
Supriya's user avatar
0 votes
0 answers
28 views

Map enum values to class constants

In our code base, we have a lot of pseudo-enums: public final class Target extends PseudoEnum { public static final ErrorCode FOO = new ErrorCode(1); public static final ErrorCode BAR = new ...
Stov's user avatar
  • 11
0 votes
1 answer
18 views

OpenTelemetry SDK Cardinality limit change

I set up a configuration for openTelemtry in Spring Boot (New Relic exporter). I can see the metrics in New Relic so everything works fine. Also I see a lot of warnings about "Cardinality Limit (...
Marcin's user avatar
  • 3

1
2 3 4 5
38221