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!
JoinJCH
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!
JoinHow to handle route access using OAuth2 with Micronaut?
I am working on a web project that uses OAuth2 to authenticate users. So the web client will send an Authorization header with a Bearer token to my Micronaut API.
To check if the token is valid, I was planning on calling this API: https://developer.okta.com/docs/api/openapi/okta-oauth/oauth/tag/OrgAS/#tag/OrgAS/operation/userinfo
If the 3rd party authenticator returns the user profile, then I assume the token is valid; if I get a 401 then it's not. I was thinking of using a hand made HttpServerFilter, but some of my teammates are more into using Micronaut Security package: https://micronaut-projects.github.io/micronaut-security/latest/guide/...
Someone help me learn Java
So i have been trying to learn java for a while now because i want to code my own Minecraft plugins (ik it sounds silly but its useful) and i just dont know what to do and im not getting any better
what to code?
intermediate level
i have been spending hours asking chatgpt what to code, but i can't seem to find something...
how do i de define keyword
i want to define keywords like the #define in c++
because ts is better than this...
Java developer first job
Hello everyone,
I am currently 2nd year CS student and I am trying to get my first job as a junior java dev. Therefore I would like to ask you what github projects let you obtain java developer position without commercial background? I have no commercial experience whatsoever and cannot get one since recruiters usually expect you to have at least one year of commercial experience when applying for internship/junior position....
implement jar library from cmd
i have JavaMacros.java that uses jnativehook.jar library. In cmd i write ...JavaMacros>javac -sourcepath src -d bin -classpath C:/Alinur/jnativehook.jar src/com/alinur/kadyr/JavaMacros.java - to compile.
When i run program by ...JavaMacros>java -classpath bin:C:/Alinur/jnativehook.jar com.alinur.kadyr.JavaMacros i get JavaMacros class not found error, class not found exception. Thanks!...
URGENT!! Netbeans GUI Application (Java)
Can anyone help me build GUI application in apache netbeans (Java)
Following a UML class diagram. Stuck and need help!
So, I have to create this small program in Java right? I finished pretty much all of it but there's this problem with the Main class that I'm pretty much stumped with. You can see my code below.
Basically as far as I understand it, this is technically the way to do it? But it doesn't work that way since it's asking the variables to be static or something. But I can't make them static because the UML doesn't say to make them static. I asked ChatGPT to what to do with this and she told me something like creating a new Main object or something but I don't think I can do that with this UML diagram? (since it doesn't say to make one).
Wondering what exactly to do here... Or even whether its doable with this diagram. Or maybe I'm missing something completely obvious. I'm really just a few weeks into this class! This is like, a question from last year's one. The code pretty much works other than that. Thanks in advance!<3...
How to find the actual implementation of library?
I am looking for the actual code implementation of
groovyx.net.http.Method.
I know one way - and that is to open IntelliJ and press ctrl+click to read the implementation.
However, I am on a computer this weekend which have no IDE, or even any Java/Groovy installed..
...ORM library to connect Database to a data class
I have a SQL database and I want to connect it to my Java file by JDBC .
But ,I don't want to write seperate statement for fetch ,insert query operations. Any library that can help me.
Ex: I have a Class Product with 20 column fields
class Product {...
how to turn off this thing
it show on accidently when i try to add a breakpoint with ctrl+shift+b
what the shower is that and how to turn it off...

Exceptions can not be thrown?
I have this problem and I do not know how to solve it. It could be found by the classloader, otherwise the import would not be able to be resolved. The import is resolved, so the exception-class can be load. Somehow the IDE is not able to load one of the dependency-classes that indicate that it is inherited from a throwable class. But how to know what classes along the inheritance could not be found?

2 spinners that can't "cross their values" in Java Swing.
Hello, I have a problem regarding 2 Spinner that are meant to not "cross their values" (Spinner A's value can't go any higher than spinner's B value, and spinner's B value can't go lower than spinner's A value). Here's my code for those 2 spinners.
```Java
private void jSpinnerXBStateChanged(javax.swing.event.ChangeEvent evt) {
zakresXA = (float) jSpinnerXA.getValue(); zakresXB = (float) jSpinnerXB.getValue();...
zakresXA = (float) jSpinnerXA.getValue(); zakresXB = (float) jSpinnerXB.getValue();...
MiniSpotify
Hello everyone,
I'm a student at the University of Computer Management in Switzerland. I'm currently doing a project for my JAVA collaborative programming course. I have to make a MiniSpotify in Java with a server-side and a client-side. I have a lot of problems with my music, playlists etc...
I can send you the PDF of the instructions and my code as a ZIP file....

