The following error occurred when I changed the JDK to JDK8→JDK11 and built it.
I don't know how to avoid this error, but
If anyone knows, could you please let me know?
Error
Package javax.sql is accessible from multiple modules: ,java.sql
Environment
·Windows 10
·Oracle OpenJDK11
·Eclipse 2020
(Supplement)
1)What we know now is
Adding "j2ee.jar" to the Java build path results in the above error.
Removing "j2ee.jar" from the Java build path will erase the above error, but
An error (class not found) occurs in the program using "j2ee.jar".
2) The following actions were performed from Eclipse, but the error was not resolved.
Right-click the appropriate project → Properties → Java Build Path → Library Tab →
Set the jar file to be used for the project in the class path.
(The JRE system library is located in the module path.)
Thank you for your cooperation.
This is probably because javax.sql
is included in both the class path and the module path.
In this case, both JDK, jee.jar
are included.
For example, the following actions can be taken:
javax/sql
from jee.jarjee.jar
.
jee.jar
is, for example, javax:javaee-api
is, but none of the versions seem to contain javax/sql
.
jee.jar
is, for example, javax:javaee-api
is, but none of the versions seem to contain javax/sql
.
Note:
© 2024 OneMinuteCode. All rights reserved.