Specific question concerning "The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml"
You do not need to decompile/recompile anything, you can simply delete the directory in the JAR file corresponding to the package.
Eclipse is confused by imports ("accessible from more than one module")
This is caused by
- a JAR on the Classpath that contains the package
java.awt
that also exists in the system library but the - JRE System Library is on the Modulepath
In the Java Platform Module System (JPMS) it is not allowed to use the same package in more than one module. If the Modulepath and the Classpath is used, everything on the Classpath is handled as the <unnamed>
module (in your case the package java.awt
exists in the system module java.desktop
and also via the JAR on the Classpath in the module <unnamed>
).
Since the JRE System Library cannot be moved from the Modulepath to the Classpath (see this answer by Stephan Herrmann for details), you only have the following options:
- Set the compiler compliance to 1.8 (as you already mentioned)
- Rebuilt the JAR to avoid Java system library package names inside the JAR (if reflection is used, additional code changes may be necessary):
- If you have the source code, change the package names (e.g. change the package and subpackae
java
tojava_util
andjavax
tojavax_util
) and recreate the JAR - If you have only the
.class
files you have to decompile the.class
files first
- If you have the source code, change the package names (e.g. change the package and subpackae
Related Topics
How to Fix Expected Begin_Object But Was String in Retrofit
Java Jackson Deserialization of Nested Objects
Extract Text Br Tags in Selenium Java
Passing List from Thymeleaf to Spring Controller
Error About Sun/Misc/Base64Encoder on Eclipse
Split Integer into Separate Parts
How to Convert Date Which I Got from Firebase Server as Am Getting Error Date
How to Put a Scanner Input into an Array... for Example a Couple of Numbers
Getting Column Names from a JPA Native Query
String.Replaceall Single Backslashes With Double Backslashes
Loop Over All Fields in a Java Class
How to View Apache Parquet File in Windows
Jpa: Update Only Specific Fields
Spring Boot: Cannot Access Rest Controller on Localhost (404)
How to Configure Hikaricp in My Spring Boot App in My Application.Properties Files
Mapstruct: Map List of Objects, When Object Is Mapped from Two Objects
Add Secure Flag to Jsessionid Cookie in Spring Automatically