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

Java tracing exam

Hello guys I have my Java tracing exam tomorrow and I have no idea how to trace can someone please help me

Something weird is happening with my Eclipse IDE

So this morning, I opened up my computer to continue a project I was working on. Then my project I was working on(the only one in the workspace as this is my first project) was gone. I panicked but then realized I could just re-import it back in. After I got it back in the workspace, my editor looked different. None of the variable names were highlighted in a different color as they normally are. I thought nothing of it, but then, I couldn't open the game while tabbed in the UI class I made. I tabbed into my main Game class, and ran the game, and saw that I had an error Exception in thread "main" java.lang.Error: Unresolved compilation problem: Syntax error, insert "}" to complete ClassBody ...

Hi everyone, I could really use your help or advice, accused of using AI

I’ve been accused of using AI to complete a programming assignment, but the truth is I wrote the code myself. I used concepts I already knew from previous courses and some features I researched on my own, like String.join and HashSet. The professor said my work includes patterns similar to those found in AI-generated submissions, even though I didn't use any AI tool. This is the first time something like this has happened to me, and I’m not sure how to prove that my work is original. I’m feeling overwhelmed and a bit lost on what to do next. If anyone has gone through a similar experience or has any advice on how to handle this kind of situation, I’d really appreciate your help. Thank you so much 🙏...

Graphics object won't draw the arrow chars from CharSet IBM437

I'm overriding a JPanel and trying to draw text with Graphics.drawChars. I can print the same exact char to the console right after it's drawn by drawChars and it correctly prints as the arrow. It has the same behavior for all 4 arrows, chars 24 to 27. I create the original string like this: ```...

can t find my exception class

dunno do i need to repopen intellij?
No description

detekt was compiled with Kotlin 2.0.21 but is currently running with 2.2.0-RC2.

I have been trying to set up detekt. but get this error. IMPORTANT they link to their website it seems: https://detekt.dev/docs/gettingstarted/gradle#dependencies but i dont understand enough from it and gpt isn't helping either. ...

Hi I am new here.

Hello, I am new here. Well thanks for that

Best way to handle discord oauth2 with JWT's in springboot webflux

Im tring to implement discord oauth2 with jwt's, i already have something working but i don't know if im doing something unsafe, i searched online and there are so many ways to do it, and a lot of the stuff i found it's old. And i currently don't know how to add the csfr-token.

Find element in array of 80k elements

Hi, I have an array of at least 80k elements (don't ask why i use katalon studio and it handles things very bad being just a copy of eclipse) And i need to look for values within the array, i think using .contains will be veery resource costly. ...

Test my Spring Boot endpoints with curl

I'm learning Spring Boot and I want to test my endpoints using curl, but I have a problem: I can't because returns me 401 code, possibly I need a basic authentication (curl username and password). How can set it up in curl and in my Spring Boot project?

How can I authenticate a user immediately after registration?

Hi. I started studying Spring Security and ran into a problem - when a user registers, he does not log in (that is, he has to go through authorization). I searched for information on various forums and websites - it says that you need to use UsernamePasswordAuthenticationToken, AuthenticationManager and SecurityContext. The problem is that the user becomes anonymous when going to any page, which makes it necessary to log in. Is it really necessary to use this particular option? Are there any exa...
No description

Java obfuscator issues

i am making an obfuscator for fun, trying to add dead code injection. its having issues with frame nodes. Issue is, i cant use COMPUTE_FRAMES, it gives me lots of issues with superclass types. ```java...

Unable to load class 'MyCreateFileBinaryPlugin'.

i followed this guide https://docs.gradle.org/current/userguide/writing_plugins.html#binary_plugins to make a binary plugin that builds fine, however i created a new project to test it (published via mavenlocal) and i get the error Unable to load class 'MyCreateFileBinaryPlugin.' I attached the custom plugin (plugin manuale) and the testing plugin (plugin-test) any help is greatly appreciated...

can t load an image from the springboot backend

gives the name but not much more than that

Whats the problem in the skript?

```on break: if "%region at event-block%" contains "wood" or "ground" or "grass" or "electric" or "posison" or "flying" or "dragon": set {_loc} to location at event-block set {_item} to type of event-block...

types don t mtach the db in springboot backend

dunno what would be a handy way to fix it

File Encryption

I was working on a project where i wanted to encrypt a file and then decrypt it. I got it working, but the key is hard coded in which i know you shouldn't do. I ma trying to figure out how i could securly do this. I want it to be download the application and the user doesnt need to do anything. https://sourceb.in/43xrL5xbBC

How do you apply libraries to multi module gradle project from root level?

I would like to use a library throughout multiple modules in my project. In order to keep all the configuration for this library in one spot, I am wondering if it is possible to apply it at the root level. How do I do this? This library is an external third party library, not a module that other modules in the same project depend on.