Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Java modules: split packages with JRE on build path?(I'm getting java.lang.module.ResolutionException and apparently one of the modules are in JRE)
Java modules: split packages with JRE on build path? [message #1830037] Thu, 16 July 2020 06:05 Go to next message
Lucas Rabello is currently offline Lucas RabelloFriend
Messages: 3
Registered: July 2020
Junior Member
Hello,

I'm new using Eclipse for Java EE (4.15.0) + Maven + Java 11, I'm trying to implement a modular project for the 1st time.

I'm trying to run a simple JUnit test and I'm getting the following error:

java.lang.module.ResolutionException: Modules javaee.api and java.xml export package javax.xml.stream.util to module org.mockito


javaee.api module was indeed declared in my module-info.java and declared in my pom.xml. But I didn't declare java.xml. Apparently it comes from JRE System Library in the module path from the Java Build Path as shown in the attached screenshot.

What I'm supposed to do in this case? Should I generate a custom JRE without java.xml so I can use in this workspace? Or can eclipse automatically do that for me?

Thanks


Re: Java modules: split packages with JRE on build path? [message #1830090 is a reply to message #1830037] Fri, 17 July 2020 07:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31342
Registered: July 2009
Senior Member
It's probably better to ask on the JDT (Java Development Tools) forum:

https://www.eclipse.org/forums/index.php/f/13/


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java modules: split packages with JRE on build path? [message #1830145 is a reply to message #1830090] Fri, 17 July 2020 20:45 Go to previous message
Lucas Rabello is currently offline Lucas RabelloFriend
Messages: 3
Registered: July 2020
Junior Member
Thanks, I'll do that, moderator please remove this topic if possible. Thanks
Previous Topic:RAD Model
Next Topic:i have errors on build gradle
Goto Forum:
  


Current Time: Tue Aug 04 00:59:39 GMT 2020

Powered by FUDForum. Page generated in 0.03266 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top