javax.persistence versus
jakarta.persistence has nothing to do with the JDK itself, it's indeed the dependencies that determine which of the two you need. Spring Boot 2.x used
javax.persistence, but in Spring Boot 3 they moved to
jakarta.persistence. This is basically just a newer version of the same thing, but due to licensing (or something like that) the
javax. package prefix could no longer be used. The
javax. package prefix is owned by Oracle, and
Java EE is now no longer owned by Oracle but renamed to Jakarta EE.