Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How To "Turn Off" A Plugin And Project Using The "Module Path"?
How To "Turn Off" A Plugin And Project Using The "Module Path"? [message #1818765] Fri, 27 December 2019 17:33 Go to next message
Steve _____ is currently offline Steve _____Friend
Messages: 48
Registered: April 2012
Member
Eclipse IDE for RCP and RAP Developers
Version: 2019-06 (4.12.0)
Build id: 20190614-1200
OS: Linux, v.3.10.0-957.5.1.el7.x86_64, x86_64 / gtk 3.22.30, WebKit 2.20.5
Java version: 11


I am helping to migrate a project from Java 8 to Java 11. The project consists of 100s of plugins(projects) bundled together to act as one massive application.

One of those plugins(projects) inadvertently got set to use the Java 9 "module path". We aren't using jigsaw.

The result is 8 compiler errors roughly along the lines of

The package javax.xml.stream is accessible from more than one module: <unnamed>, java.xml	


I've tried removing java.xml from the Build Path > Configure Buildpath > Module Dependencies tab, but that creates 2 new errors:

The project was not built since its build path is incomplete. Cannot find the class file for java.awt.geom.Rectangle2D. Fix the build path then try building this project   

The type java.awt.geom.Rectangle2D cannot be resolved. It is indirectly referenced from required .class files   


I was able to fix those by adding java.desktop to the Module Dependcies tab, but then the original 8 errors come back :).


Googling around it seems like the thing I need to do is to tell Eclipse that this plugin/project does not want to use Jigsaw or the Java9 module path.

How can I do that?

Thanks

Steve

[Updated on: Fri, 27 December 2019 23:13]

Report message to a moderator

Re: How To "Turn Off" A Plugin And Project Using The "Module Path"? [message #1818772 is a reply to message #1818765] Fri, 27 December 2019 22:30 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1828
Registered: July 2009
Senior Member
Steve _____ wrote on Fri, 27 December 2019 18:33

[...]
I am helping to migrate a project from Java 8 to Java 11. The project consists of 100s of plugins(projects) bundled together to act as one massive application.
[...]
The result is 8 compiler errors roughly along the lines of
The package javax.xml.stream is accessible from more than one module: <unnamed>, java.xml	



This very much sounds like https://stackoverflow.com/questions/51094274/eclipse-cant-find-xml-related-classes-after-switching-build-path-to-jdk-10/53824670#53824670 but seeing that you already tried to fix this on the "Module Dependencies tab" this may not be news to you.

Quote:

I've tried removing java.xml from the Build Path > Configure Buildpath > Module Dependencies tab, but that creates 2 new errors, which when fixed, bring back the original 8.

It might be interesting to see what 2 new errors you saw, and how you tried to fix them.

Quote:

Googling around it seems like the thing I need to do is to tell Eclipse that this plugin/project does not want to use Jigsaw or the Java9 module path.


This is not strictly possible. As soon as you compile against a JRE >= 9, this JRE will consist of modules, and you have to follow the rules of JPMS (formerly code named Jigsaw). If your own code does not define any modules, then your code lives in the "unnamed module", but still the rules of modules apply.

Regular libraries can be moved back and forth between classpath and module path, but this is not possible for a modular JRE.

Sorry, but those are the rules.
Stephan
Re: How To "Turn Off" A Plugin And Project Using The "Module Path"? [message #1818773 is a reply to message #1818772] Fri, 27 December 2019 23:14 Go to previous messageGo to next message
Steve _____ is currently offline Steve _____Friend
Messages: 48
Registered: April 2012
Member
I updated my original post to include the 2 additional errors I mentioned.

Thanks for the SO link, I don't think I have seen that one ( just two authors I have squeezed dry ).

I'm going to read that and your post, digest them all, see where I can get, and reply back.
Re: How To "Turn Off" A Plugin And Project Using The "Module Path"? [message #1818785 is a reply to message #1818773] Sat, 28 December 2019 10:36 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1828
Registered: July 2009
Senior Member
java.awt.geom.Rectangle2D is in the system module "java.desktop". Since java.desktop requires "java.xml" you cannot remove the system module java.xml. Instead, you should make sure that no other library in your dependencies provides packages java.xml.*.
Re: How To "Turn Off" A Plugin And Project Using The "Module Path"? [message #1818787 is a reply to message #1818785] Sat, 28 December 2019 11:53 Go to previous messageGo to next message
Steve _____ is currently offline Steve _____Friend
Messages: 48
Registered: April 2012
Member
Stephan Herrmann wrote on Sat, 28 December 2019 05:36
java.awt.geom.Rectangle2D is in the system module "java.desktop". Since java.desktop requires "java.xml" you cannot remove the system module java.xml. Instead, you should make sure that no other library in your dependencies provides packages java.xml.*.


By dependencies do you mean the classpath?

Here are some screen shots of my Build Path dialog tabs. I've seen some javax.xml jars in my class path but the button to remove them is greyed out.

[Updated on: Mon, 30 December 2019 16:09]

Report message to a moderator

Re: How To "Turn Off" A Plugin And Project Using The "Module Path"? [message #1821106 is a reply to message #1818787] Wed, 05 February 2020 16:33 Go to previous message
Steve _____ is currently offline Steve _____Friend
Messages: 48
Registered: April 2012
Member
I found the redundant jar by using Ctrl Shift T to open the type editor and the searching on that name.
Previous Topic:classpath problems after updating to eclipse 2019-12
Next Topic:How to turn up off source cleanup in a code section?
Goto Forum:
  


Current Time: Sat Oct 31 08:29:28 GMT 2020

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

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

Back to the top