Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

We are a Community full of Java developers. You can come here to connect other devs, get help, help others and do many more things!

Join

java-help

❓︱qotw-answers

Can someone please explain to me how this works

public class LinkedList { . . . public void addFirst(Object element) {...

SPRING BOOT vs VERT.X

Hello, everyone! I’m starting my journey as a back-end developer in Java, and I’m currently exploring Vert.x and Spring Boot. Although I don’t yet have solid professional experience with either, I’m looking for tips and advice from people with more expertise in the field. I’m a big fan of performance and always strive to maximize efficiency in my projects, aiming for the best performance at the lowest cost. In all the benchmarks I’ve analyzed, Vert.x stands out significantly in terms of performance compared to Spring Boot (WebFlux). On average, it handles at least 50% more requests, which is impressive. Based solely on performance metrics, Vert.x seems to be the best option in the Java ecosystem, surpassing even Quarkus, Spring Boot (WebFlux/MVC), and others. That said, I’d like to ask: What are your thoughts on Vert.x? Why is it still not widely adopted in the industry? What are its main drawbacks, aside from the added complexity of reactive programming?...

Compiling class file to Jar always fails

so, im trying to compile a class file to a jar but I always get an error saying that it couldn't parse file arguments, what do I do?

Adding to unicode

I'm trying to take a phrase from user (EX. "ABC"), and add 2 to the Unicode. After adding two to the Unicode, it would then convert it back to a character. for example: input: ABC output: CDE...
No description

countDigits I need help

Hello I'm studying Computer Science and cant solve this problem right. Write a method that counts how many times a specific digit a appears in the decimal representation of a number b. It is guaranteed that the number b and the digit a are both greater than or equal to 0, with a being at most 9. Even if b = 0, the method should correctly determine whether and how often the digit a appears. ...

Weird Error when running/calling FATJar

What is this so called Graphic Device initialization failed for d3d, sw and Error initializing QuantumRenderer. running the App like following: ``` rem CONFIGURATION...

need help to import pdfbox using gradle

Hello, i need help using pdfbox in java, im trying to import it using gradle, I am using JDK21
No description

Problem Accessing yml elements using java for minecraft

Problem Accessing yml elements using java for minecraft : i'd like to have kits where i give players some blocks defined in the config.yml but when i try it, it doesn't work, the yml is valid, the code too, the list in't null, but doesn't show any element event if i put a basic element at the start of the list (BEDROCK one) Version mc + spigot 1.16.5...

Create and push docker file and deploy project to render.com

I created a web service using spring boot and maven for building. I tried to build a Dockerfile but getting an error when I my test files are part of the project, if I delete them the docker build is passed successfully. I need the docker file in order to deploy my project using render.com....

New to JSP and Servlet - Struggling with database

New to servlet and JSP (Maven project) using tomcat 11.0.1 Hi there, I'm new to Servlets and JSP, and I'm feeling a bit stuck. I'm having trouble retrieving items from a database and displaying them on a JSP page. I think I might be missing something, but I'm not sure what....

Using singleton pattern at a request level basis

I am fetching a response twice in an api flow. So how can I use singleton pattern here to return the same response again without making the second call.

I am completely new

Hey guys, I need some help by learning general Java, I am completely new I don’t have any experience I even don’t know how to install it or something. In the best situation someone of you is German to explain me how to start, I am 14 years old and want to start earlier than other Guys. I will be proud if somebody can teach me how to start in a Discord Talk/Channel. I want to use Java cause in my future I want to help Minecraft servers and get paid for my work....

Connecting to my MongoDB Database

Hello everyone, I am struggling to find the reason why I cant connect with my database on MongoDB. This is my first project on java ever and it is going to be an App. I think I have the wrong line of code for the connection I intended to use on MongoDB and I kinda got confused with all the Methods. I am using VS Code and I think using the MongoDB extension on VS is the most practical going forward. So if anyone has some experience working with these tools I would appreciate the help. When trying to run the server this is the error message iI get querySrv ENOTFOUND _mongodb._tcp.cluster0.mongodb.net and this is the line on my .env i am using to connect to MongoDB MONGO_URI=mongodb+srv://mmetinbirguel:[email protected]/Tierlist?retryWrites=true&w=majority Of course I have my real password instead of just "password" there, for safety reasons I share it like this 😄 ...

can smb explain what is the difference between bitwise and logical operators?

i dont understand at all. and the more i google the less i get it.

Graduation year project

iam a Network engineering student And looking for Idea that compine networking stuff with coding I have good knowledge in java and networking So what is your suggestions?...

My vs code wont run!

I am having trouble figuring out what i need to download or change in order to get my code to run on Visual Studio code. If there is something I need to attach please ask. Otherwise I have no idea what to do

Eclipse MAT - Remove Self-Referential Inbounds

I'm trying to track down a memory leak, and I can't figure out how to find what's retaining the object. Many of the object's members hold references to it, so the inbounds view is clogged up by those items that will get freed with the object. Doing "shortest path to GC root" zooms out to the massive top level of the classloader itself, making me dig all the way down to find the object in question. Does anyone know how to filter the inbounds of an object to just those that wouldn't get disposed with said object?...

Java with Maven Projects not creating jar files

so, im on netbeans 23 and im doing a project that asks me to create a jar file but there is no option for me to create a jar file anywhere within the IDE. what do I do?

com.google.gson.JsonIOException: Failed making field

It looks like having my project as a module is doing silly things with Gson, it can't even access java classes? I cannot do an "opens java.time to com.google.gson" ```bash Caused by: com.google.gson.JsonIOException: Failed making field 'java.time.LocalDate#year' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type. See https://github.com/google/gson/blob/main/Troubleshooting.md#reflection-inaccessible-to-module-gson...

How to create custom login route in Spring?

Like I want to have a custom frontend, therefore I need /auth/signin sort of route, but I'm not sure how should I implement it, any idea how can I do so?