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!
JoinMYSQL Connector Driver Issue
Hi, I'm trying to implement an sql database, but I'm only getting the "No suitable driver found", anyone knows why it could be?
implementation group: 'com.mysql', name: 'mysql-connector-j', version: '9.1.0'
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/name?user=user&password=password...Error: Could not find or load main class
i am facing this problem i dont know what to do now ! Can anyone help me upon this ?
```package com.demo.journalApp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;...
What is the best way to get better at java?
I'm new to java and i just started learning oop and some data structures.
I have an upcoming exam in two weeks about oop and synatx in java and overall things such as encapsulations and anonymous class.
what is the best way for me to practice this new knowledge and gain some new knowledge too?...
I dont know anything about java, why wont this let me install NeoForge?
this is the latest version of java and ive reinstalled it twice and this NeoForge installer and its just giving me this same error

help with JDK installation
I had jdk 23 and jdk 17 version and i needed jdk 17 version but i couldn't get system to switch to jdk 17 so i just deleted jdk 23 folder. But now when i try java -version ir jus gives me a blank line and i don't know what to do. I tried changing enviorments. I tried restarting and reinstalling. Nothing seemed to work. Maybe you have some suggestions?
Java constructors
As Ive read constructors are automatically run by java, but so is main () method, so whats their point and why cant I just put all of constructor code in front of main() method?
Syntax questions
Id like to know what these syntaxes mean:
javadoc -d doc Hello.java
jar -cf hello.jar Hello.class
java -cp hello.jar Hello...
Figuring out path to resources in built jar
Im currently doing this to read my shader files:
and it works when just testing in intellij, but if i build the jar it no longer works as the src/main/resources part of the path doesnt exist. Any solutions?...
Utils.readFile("src/main/resources/assets/base/shaders/scene.vert")
Utils.readFile("src/main/resources/assets/base/shaders/scene.vert")
How to organize build.gradle files and class structure in gradle project?
I want to make a plugin for teamcity and jenkins, but i'm not sure how I should be structuring my project to best fit that.
I've seen examples where there are multiple build.gradle files at various levels of the project, but some plugin/dependency definitions seem redundant between them as opposed to being in a more top-level build.gradle (if that makes sense). I'm not familiar with gradle or java at all. Any pointers would be incredibly helpful!
I also don't know how classes should be structured in a gradle project. I know there may be differing methodologies here, but I'm thinking the project structure might look like this:...
Need help converting Java file to Class.
Im not a code wizard or anything but i like to dive into minecraft mod packs are change values for better gamplay. I was trying to edit this mod and noticed that the file i was tring to edit was a CLASS file and not a Java one, so i used an online converter to change the Class into a java but now im wondering how to make the Java into the Class again. PLEASE, I NEED HELP!!!
Need help with GUI (swing)
This is my first project where I use swing and I need help making the textArea in bankStatementInterface larger in y axis. I've attached images with relevant code and with the interface.

I am getting TLE in Leetcode on question 29. Please help me optimize.
I am using the most efficient code that I could understand. Please suggest how to optimize it for the test case where the dividend is int_max and divisor is -1.
```java
public int divide(int dividend, int divisor) {
// if(di(1<<31))...
MapStruct updater not compiling properly
I'm creating a REST API that handles product management. I currently have 3 Mapper (from MapStruct) for classes:
Account, Product, and Variant.
The branch I'm working on if you need to understand the structure:
https://github.com/vianneynara/kuenyawz-api/tree/feature/21-initialize-product-variant-image
...
Hi, I am having trouble in java with a project. Need help.
My code is only outputting one line.
need help....



