You dont have to make any changes as javax.naming is still compatible with Java 11 . It is still part of Java 11 and not part of Jakarta. Please refer the official documentation of Java 11 .
https://docs.oracle.com/en/java/javase/11/docs/api/java.naming/module-summary.html