<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
This mailing list is a general discussion list, it's not the place
to bring support questions.<br>
<br>
In this case, I think your starting point has to be security-dev as
it's about stripping security classes and dealing with whatever
breakage and side effects that might bring. So I think start there
and explain what you are trying to do.<br>
<br>
As regards jlink, the option you found is for excluding files, such
as launchers, from the run-time image, it's not about
classes/resources.<br>
<br>
-Alan<br>
<br>
<br>
<div class="moz-cite-prefix">On 08/12/2024 03:15, Dimitri John
Ledkov wrote:<br>
</div>
<blockquote type="cite" cite="mid:CANBHLUi0t9pb8oQ0qp_ijkdci4FjqFOCdqk84o3ZMFtVMtR9bA@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>I have tried all invocations of jlink with
--exclude-files and failed to make it exclude anything at
all.</div>
<div><br>
</div>
<div>I was hoping to exclude SunRsaSign.class from the
java.base jmod if at all possible:</div>
<div><br>
</div>
<div>
<div>rm -rf /tmp/myjre</div>
<div>jlink --output /tmp/myjre
--exclude-files='glob:/java.base/**/SunRsaSign.class'
--add-modules java.base</div>
<div>jimage list /tmp/myjre/lib/modules | grep
SunRsaSign.class</div>
<div> sun/security/rsa/SunRsaSign.class</div>
</div>
<div><br>
</div>
<div>But trying any other patterns to exclude anything else,
seems to have no effect and everything is always included.</div>
<div><br>
</div>
<div>If I want to really exclude a class, do I need to
rebuild the jmod first too?</div>
<div><br>
</div>
<div>Is there any working example of --exclude-files which
shows invocation without it preserving a given file in the
resulting modules?</div>
<div><br>
</div>
<div>Did I completely misunderstand the feature and
--exclude-files is only to exclude other toplevel files in
the output jre directory, and cannot affect what ends up
in the /modules file (partial jmod inclusion)?</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">Regards,<br>
<br>
Dimitri.</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>