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

School Assignment

I have a school assignment due tomorrow and I have been stuck on the same damn test case for three days. Before anyone asks, I have gone to office hours and asked TAs however this is a new issue and now one is around. I am making an employee database and populating it based on a csv file which I cannot view. I have been able to do everything correctly so far and the file has no errors, however I cannot pass one of the test cases. The code has to find if an employee is apart of one or more depart...
No description

Slot Machine 💵

Guys I know the code is very messy and messed up... But still can anyone tell me how I can actually make the important() method run ?
No description

Help me build an app

hiii guys i realy need help building an application for macos i need to build a food categorisation menu-styled app i thought of writing it in java since im familiar w it though i dont know wht else to do pls dm me for more details if u can help...

Need help with Output/ Input reading and writting exercise

How y'all doing today? I'm working on an exercise for class where i have to solve the next problem: In this task, we must create an application that displays the multiplication table for numbers from 1 to 10. To achieve this, we will create an application (which will be the child process) that generates the multiplication table for the number it receives as input. -The parent process will make 10 calls to the child process, passing as input the number of the table that the child must generate (1...10). -The child process will take this number and print the corresponding multiplication table. -The parent process will receive what the child prints and display it....
No description

Looking for a Free and Fast AI Model for Spring Boot

Hey everyone! I’m a Spring Boot and JavaScript developer currently working on a practice project using AI models. In JavaScript, I used a free ChatGPT package, and it gave instant responses. But in Spring Boot, I’ve been trying models like Ollama, DeepSeek, and Mistral — the issue is that they take a lot of time to respond because they’re heavy models. ...

How to implement jwt authentication in microservices

Hello i have spring mvc microservices applications which has: naming server, api gateway, web service and auth service. Auth service has login for generating tokens and registring users in database and rest api for those operations. In web service I have thymeleaf and mvc controllers which can handle login and register form. However I have no idea how to design app so that api gateway could automaticaly verify those tokens for me as auth logic is in separate service same as mvc forms. Could someone describe to me how to design such app? Here is my rest controller ``` @RestController...

Where do I start

What tutorial or smth do I use

Which free AI Model used in springboot 21?

I am a Spring Boot developer and a JavaScript developer. Right now, I am working on a practice project using AI models. I want to use a free AI model. In JavaScript, I used a free ChatGPT package to work on my AI model practice project, and it gave instant responses. But in Spring Boot, I am trying to use AI models like Ollama, DeepSeek, or Mistral. The problem is that whenever I send a request, it takes a lot of time to get a response because these models are heavy. I need fast responses, just like with GPT. Is there any free model for Spring Boot that can provide quick responses, similar to JavaScript?...

Maven With Java 25

Hello everyone! Im starting to learn java. I tried to configure maven to work with maven.compiler.release to be 25. However I keep getting errors. Any way one can provide example of pom file with java25? Thanks in advance !...

Looking for java Swingset3

Hey guys, was wondering if anybody for love of god can guide or help me on where I can find this specific version of java Swingset3? https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html Above is the link to the picture the specific version I'm looking for, also provided image id nobody wants to open the link. PLEASE for the love of god if anybody knows where I can get it, specially along with it's source code so I can navigate in-app source code tabs as u can see in the pictures that would be a great help....
No description

Round trip reflective serialisation with exact type matching

I need to serialise lists of heterogeneous Objects. These lists represent arbitrary "lookups" into data. For example [John, 2000-01-01] when paired with a key like [name, dob] represents people named John born on 2000-01-01. These key and value lists are saved in a database and associated with other data. The difficulty is that at runtime I only have a List<Object> for the values. I can save this as JSON in the database but when pulling it out of the database number types will not map to the original type. JSON does not differentiate numerical values so eveything becomes double. I need the round trip to be identical so the objects generated by the application and those that are saved can be compared for equality. I'd be grateful for any possible solution. So far I've considered Message Pack, Cbor and custom encoders/decoders. I only need to handle most primitive types, dates, timestamps and a small selection of others. ...

How to connect Checkstyle JAR (v10.12.1) with VS Code

Hi everyone 👋 I downloaded Checkstyle JAR version 10.12.1 and the google_checks.xml file, but I can’t figure out how to connect the Checkstyle JAR with Visual Studio Code. Could someone please guide me step by step (what exactly I need to click/configure) to make it work? 🙏...

JNI IllegalAccessError

I am using JNI to call some static Java method from Rust side, but its throwing an java.lang.IllegalAccessError exception the code for calling the method is nothing special: ```rs // 5. Start JVM...

Multithreading

When dealing with multiple threads, is it better to extend the Thread class or implement Runnable?

Completed Java, 10 months left in final year — Feeling a bit lost, what should I focus on next?

Hi everyone, I’m currently in my final year of BTech, and I have around 10–11 months left before graduation. Recently, I completed learning Java (core + OOPs, etc.) from BroCode's 12hr YT tutorial, and I’m now trying to figure out what I should focus on next to make the most of this year.
A bit about my background:-
i have decent knowledge of frontend development (ReactJS)....

Why am i getting error: generic array creation?

Hello everyone. I started doing codewars, and got stuck on the first task. Ive this: ```java public static List<Integer>[] arrayOfLists = new List<Integer>[] { Arrays.asList(1, 2, 3), Arrays.asList(4, 5, 6),...

Anonymous Classes

Hey guys, is anyone able to explain quickly an example of why you’d need to use an anonymous class?

redhat openjdk problem

please i need help i cannot figure out why i cant run a java file even though i have redhat openjdk installed on my linux
No description

Create ErrorLens like plugin for IntelliJ

I wanted to create a ErrorLens (VSC Plugin) like plugin in IntelliJ, because every already available plugin is really slow and isn't customizable enough. But im not able to find any docs about how to do it and i can't really understand the already available plugins src because they are written in scala and im tring to write them in Java.

Lambda Expression

Guys I had a question regarding lambda expressions in Java, when the abstract method from the functional interface requires a parameter, is the parameter not mandatory to be inputted in the code block you pass into the abstract method?