The error “Implicit super constructor Enum(String, int) is undefined” emerged in java21. It refers to an enum definition with a constructor when JRE System Library [java21] is the default. I can only avoid the problem by reverting to default JDK 18. But I would like an explanation about why java21 has this problem; how to use java21 and not get this error, please.
I also tried creating a new project with default JRE 21 and got the same bogus error. I reverted the new project JRE18 which eliminates the bug, then re-revert to JRE21 and the bug is back. (without changing the enum code.) java 21 can’t find its Enum(String,int) constructor. This appears to be a bug in JRE21. Any fixes?
juan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1