Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JDK12 - "" not accessible
JDK12 - "" not accessible [message #1818211] Tue, 10 December 2019 09:48 Go to next message
Albert Palio is currently offline Albert PalioFriend
Messages: 1
Registered: December 2019
Junior Member
I'm trying to import in Eclipse (2019-09 R (4.13.0)) a Maven project which uses the JDK 12 and makes use of classes from the package.
Everything compiles fine, except for the classes from that package, which are found but not accessible (the compiler raises the error "The package is not accessible").
How to fix this?

Re: JDK12 - "" not accessible [message #1818242 is a reply to message #1818211] Tue, 10 December 2019 20:55 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1828
Registered: July 2009
Senior Member
Oracle really doesn't want you to access classes in, the corresponding module-info for jdk.compiler declares:
    exports to

Ergo, the package is accessible only to those two modules.

If you must break these rule (and take all responsibility on yourself), see:

(look out for the parts about exports).
Previous Topic:Cant start javascpirt project
Next Topic:openxmlformats schemas problem with indirect refrerence
Goto Forum:

Current Time: Mon Oct 19 22:23:59 GMT 2020

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

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

Back to the top