<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Thank you for your suggestion.<br>
<br>
jansi should be placed in the boot layer, because it is also used by
log4j2, that also should be in the boot layer.<br>
<br>
I think (I may be wrong, because I am not a JPMS guru like jigsaw
team members) the problem arises due to two serious constraints:<br>
1. we don't have access to the boot layer controller and we received
a categorical refusal to grant access to it.<br>
2. qualified opens/exports doesn't work to child layers.<br>
<br>
For example, I can't even open an issue in jansi project to open
internal package to jline because it gives nothing in this
situation.<br>
<br>
Best regards,CR<br>
<br>
<div class="moz-cite-prefix">On 1/31/25 17:30, David Lloyd wrote:<br>
</div>
<blockquote type="cite" cite="mid:CANghgrQVEbwWvkrnGkTQhdOqXdnotMJeFim0t1YzVdqNQFevQw@mail.gmail.com">
<div dir="ltr">
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif">AFAIK it cannot
be done with `jansi` in your boot layer. One solution would be
to put it into a child layer, which will allow you to access
the `Controller` for it, which you can then use to add the
export manually after defining the `jline3` module in its
sub-layer. Otherwise, `jansi` would have to cooperatively call
`Module.addExports` for your module, which seems unlikely to
me.</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">On Fri, Jan 31, 2025 at
7:19 AM Code Ranger <<a href="mailto:coderanger2025@outlook.com" moz-do-not-send="true" class="moz-txt-link-freetext">coderanger2025@outlook.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello
all.<br>
<br>
I have a boot layer with `org.fusesource.jansi` module a child
layer with jline3 module. Jline3 wants to use jansi:<br>
<br>
Caused by: java.lang.IllegalAccessError: class
org.jline.terminal.impl.jansi.JansiTerminalProvider (in module
org.jline) cannot access class
org.fusesource.jansi.internal.Kernel32 (in module
org.fusesource.jansi) because module org.fusesource.jansi does
not export org.fusesource.jansi.internal to module org.jline<br>
at
<a class="moz-txt-link-abbreviated" href="mailto:org.jline@3.28.0/org.jline.terminal.impl.jansi.JansiTerminalProvider.verifyAtLeast">org.jline@3.28.0/org.jline.terminal.impl.jansi.JansiTerminalProvider.verifyAtLeast</a>(JansiTerminalProvider.java:85)
~[jline-3.28.0.jar:?]<br>
at
<a class="moz-txt-link-abbreviated" href="mailto:org.jline@3.28.0/org.jline.terminal.impl.jansi.JansiTerminalProvider">org.jline@3.28.0/org.jline.terminal.impl.jansi.JansiTerminalProvider</a>.<init>(JansiTerminalProvider.java:93)
~[jline-3.28.0.jar:?]<br>
at
java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
~[?:?]<br>
at
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
~[?:?]<br>
at
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
~[?:?]<br>
at
<a class="moz-txt-link-abbreviated" href="mailto:org.jline@3.28.0/org.jline.terminal.spi.TerminalProvider.load">org.jline@3.28.0/org.jline.terminal.spi.TerminalProvider.load</a>(TerminalProvider.java:69)
~[jline-3.28.0.jar:?]<br>
<br>
If I do<br>
--add-exports
org.fusesource.jansi/org.fusesource.jansi.internal=org.jline \<br>
<br>
I get WARNING: Unknown module: org.jline specified to
--add-exports<br>
(as I was already told if a module is not the boot layer it is
just ignored)<br>
<br>
if I do<br>
--add-exports
org.fusesource.jansi/org.fusesource.jansi.internal=ALL-UNNAMED
\<br>
<br>
I get the same exception.<br>
<br>
Could anyone say how to fix it?<br>
<br>
Best regards, CR<br>
<br>
</blockquote>
</div>
<div><br clear="all">
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">- DML • he/him<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>