Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!

Join

java-help

❓︱qotw-answers

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:password@cluster0.mongodb.net/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?

when i am starting as springboot application on eclipse it is working fine but when i am running th

when i am starting my springboot project as springboot application on eclipse it is working fine but when i am running the jar file on cmd it is showing the mailstrap error. ( Error processing condition on org.springframework.boot.autoconfigure.mail.MailSenderAutoConfiguration 2024-11-24T20:39:24.197+05:30 INFO 10344 --- [smartcontactmanager2.0] [ main] .s.b.a.l.ConditionEvaluationReportLogger : Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled....

Looking for Tips, Advice and Resources for Project Management with Java and Gradle

Hi, I am new to java and gradle and want to make a project larger than a simple hello-world or calculator app. I am not using any IDEs at the moment because I am interested in learning CLIs and how stuff might need to be set up manually. I know its probably dumb and I'd almost never have to do it, I just want to for learning purposes. That being said, what would the best way be to add additional java files and classes in a typical gradle project? Should I be adding classes under /app/src/main/java/project-name? Should I be manually making .java files in the main and test folders? Or is there a gradle command that can template this out? I apologize for my noobliness. As the title suggests, anything related to project management would be appreciated! And sorry I am not looking to use Intellij or Eclipse or an IDE for this project, however I am open to in the future. Thanks in advance!...

algorithims in java

Hello can anyone help with algorithims in java i dont understand anything

Program Randomly Quitting After Font.createFont() statement

After I try to get the font "ggsans", which is in the src/main/resources folder, the program randomly quits with exit code 1. Code ```java static {...

Unpacking packed int

I came up with these methods to pack and unpack ints: ```java public static int packInts(int first4, int last4) { return (first4 << 16) | last4; }...

Maven Archetype Catalog

Having some trouble getting a remote archetype catalog created. I figure it could be automatically managed by maven when I push an archetype but there doesnt seem to be good documentation around it. I'm using AWS CodeArtifact as my remote repo, which means I need to have all files inside a package, where the docs outline the archetype-catalog.xmlshould be at the root of the repo Anyone have any experience with this?...

Detecting only the first letter in a scanner

I made a course (Like it teaches and Tests Users Knowledge). And I just want to detect the first part of what they write. Like I made commands such as /start or /learn. But if they add a space or adds anything. It won't be able to detect it using switch. Is it possible to just detect the first part? Or the first letter? Because The Exams to answer the exam. You just put a letter like a, b, c, d. If they add a space it will say Unknown input.