Java Community | Help. Code. Learn.

JCH

Java Community | Help. Code. Learn.

We are a Community full of Java developers. You can come here to connect other devs, get help, help others and do many more things!

Join

java-help

❓︱qotw-answers

Java classfile api example

https://openjdk.org/jeps/457 can anyone provide an example of using this to get the contents of a class method? its relatively new tech and couldn't find it anywhere...

Organization

Hey guys, I would like some pointers from an experienced Java programmer. How should I organize my classes, methods, packages, etc?

helppp

When i install the java ORACLE setup it doesnt open, what i can do, bc, i have java jdk but i dont have oracle for minecraft mods

How to start Spring

I have grasped the Java SE and am going to start the Java Spring journey, but I have a little knowledge of Tomcat server and Java Servlet. Therefore, when I read some spring books such as Spring 6 in action, there are so many challenging for me like understanding some parts of terms in these books. Hope anyone can recommend some spring learning resources or what should I do before learning Spring!!...

No Persistence provider for EntityManager named IceCreamShopPU

``` Jan 30, 2025 9:51:12 AM jakarta.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver log WARNING: jakarta.persistence.spi::No valid providers found. Exception in thread "main" jakarta.persistence.PersistenceException: No Persistence provider for EntityManager named IceCreamShopPU at jakarta.persistence.Persistence.createEntityManagerFactory(Persistence.java:96)...

VS Code Setup Help for Maven Web App and Apache Tomcat Server

Guys, I am learning Servlet, JSP, and Hibernate, and I want to build a project using them—a Maven Web Project. My plan is to first set up a Maven Web Project and then use JSP, Servlet, and Hibernate to build the project in VS Code. I am able to create the Maven Web Project using the maven-archetype-webapp, and I want to run this project on the Apache Tomcat server. Additionally, I want to see real-time changes—whenever I modify my index.jsp file or anything else, it should reflect immediately after starting the server. I have tried everything and watched 20+ videos, but I am still unable to properly set up or configure my Maven Web App with the Tomcat server....

HTML BUTTONS

i might be stupid but I have a werid error with html. I'm trying to make these buttons take me to different html pages in different folders and it's not working and saying they can't find the page. Somebody please help!
No description

Performance testing of call with insertion of million records

Is there a way to do some testing where you test endpoints that pull million record from an api and do a bulk insert into a db. How would I add a performance test on this? Aside from calling the endpoint directly to test. I want to simulate or mock the data objects as well.

What is wrong with my code?

Hello! I am trying to code along but am not getting the same result. I have been inspecting my code so much I feel a bit blind, so could I perhaps get a second pair of eyes, with maybe a bit more knowledge? I am learning Spring, working with Spring Boot & Databases. It is not much code, three classes so if it's not minded I will just share it here....

I got this error

Global AuthenticationManager configured with an AuthenticationProvider bean. UserDetailsService beans will not be used by Spring Security for automatically configuring username/password login. Consider removing the AuthenticationProvider bean. Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider. If the current configuration is intentional, to turn off this warning, increase the logging level of 'org.springframework.security.config.annotation.authentication.configuration.InitializeUserDetailsBeanManagerConfigurer' to ERROR
2025-01-29T19:44:52.395+05:30  INFO 13664 --- [ScriptEnhancer] [ main] o.s.d.j.r.query.QueryEnhancerFactory  : Hibernate is in classpath; If applicable, HQL parser will be used.
Global AuthenticationManager configured with an AuthenticationProvider bean. UserDetailsService beans will not be used by Spring Security for automatically configuring username/password login. Consider removing the AuthenticationProvider bean. Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider. If the current configuration is intentional, to turn off this warning, increase the logging level of 'org.springframework.security.config.annotation.authentication.configuration.InitializeUserDetailsBeanManagerConfigurer' to ERROR
2025-01-29T19:44:52.395+05:30  INFO 13664 --- [ScriptEnhancer] [ main] o.s.d.j.r.query.QueryEnhancerFactory  : Hibernate is in classpath; If applicable, HQL parser will be used.
```@Bean SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {...

Database Connection

Trying to make a project that connects to a database but I'm having a hard time figuring out how to connect my database password in my connection string

I need help to understand consumers without autowire in spring

It's in kotlin. I am beginner in kafka I can read my kafka message very well with Autowired annotation but on trying to manually create I am getting 0 message . Code description :...

Atom editor - coloring the syntax

Hi, does anybody inda house using Atom editor and have issue with color making the code? I ve tried change Color syntax theme and it did not work. It look like one should have some code for it....

Spring Boot r2dbc enum error - org.springframework.r2dbc.BadSqlGrammarException

I have been working on creating a chat_module application with Reactive programming - spring boot 3.4.1, postgres-r2dbc, and mongo reactive. While previously I was using Strings for some columns in the postgres, the application was working fine but after i switched to enums it is giving me error. I tried a lot of things now since last two weeks. ...

attempted this code but still not working

do you see what could be the issue with this code? a attempted re-typing what I saw in the video but it is still not working I am not sure what I mistyped or what
No description

Own video streaming

Hi, for my project I would like to implement on-demand video streaming. Currently I have no clue, should I implement it myself or should I use a third party api which is expensive. If it's not hard to implement it myself, it's not worth paying for third party. What do you recommend, maybe you have your own experience and can make a guide for it?

Max/M4L first java test

Hi guys, I duno if u can help me out, since this in Max environment, which may be specifics, but this fcnt should give value 4.3 but gives nan. This part of tuts, so I continue in that, but I already smth missing so would like to figure it out. ...

Tiles in a 2d Java game

In working on making a simple tile-based 2d game and I was just wondering about something. Say I have a setup like so; 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0...

how to solve this without loops at all

is there a way to solve this without any loops at all? (no for loops)
No description