<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div style="16px">I have a simple, working groovy program that uses
jcifs-ng and builds a fat jar using gradle. I've built a native image
from the jar using this (rc11 on Fedora 29):<br></div><div style="16px"><br></div><div style="16px">native-image -Dgroovy.grape.enable=false \<br></div><div style="16px"> --enable-url-protocols=https \<br></div><div style="16px"> --allow-incomplete-classpath \<br></div><div style="16px"> -H:+AllowVMInspection \<br></div><div style="16px"> -H:+ReportUnsupportedElementsAtRuntime \<br></div><div style="16px"> -H:ReflectionConfigurationFiles=dgm.json,stagepl.json \<br></div><div style="16px"> --no-server \<br></div><div style="16px"> -jar build/libs/cppl-all.jar<br></div><div style="16px"><br></div><div style="16px">I've
been tinkering with this for a couple of rc's, and cutting and pasting
from blogs and tutorials, so I don't remember what many of those options
do.<br></div><div style="16px"><br></div><div style="16px">Anyway, when I run the native image, it throws an exception:<br></div><div style="16px">Exception in thread "main" jcifs.CIFSException: The default OEM encoding Cp850 does not appear to be supported by this JRE.<br></div><div style="16px"> at jcifs.config.BaseConfiguration.initDefaults(BaseConfiguration.java:753)<br></div><div style="16px"> at jcifs.config.BaseConfiguration.<init>(BaseConfiguration.java:158)<br></div><div style="16px"> at cppl.main(stagepl.groovy:31)<br></div><div style="16px"><br></div><div style="16px">In jcifs-ng, that's here <a target="_blank" rel="noopener noreferrer" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_AgNO3_jcifs-2Dng_blob_master_src_main_java_jcifs_config_BaseConfiguration.java&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=IArLvpg78SyGpDTOlzeGFFd0yvvkDUTbnsi4AFhCo7A&s=OnRdX5WiHBa5PIlclDz5g8Oc1zp5o4y24veXmrKfZ1k&e=">https://github.com/AgNO3/jcifs-ng/blob/master/src/main/java/jcifs/config/BaseConfiguration.java</a>:<br></div><div style="16px"><br></div><div style="16px"><div style="16px"><div style="16px"><span class="">protected</span> <span class="">void</span> <span class="">initDefaults</span> () <span class="">throws</span> <span class="">CIFSException</span> {<br></div></div><span class=""> try</span><br><span class=""><span class=""> ""</span>.</span><span class="">SmbConstants<span class="">.</span>DEFAULT_OEM_ENCODING</span><br><table data-tab-size="8" class=""><tbody><tr> {</tr><tr>getBytes();</tr></tbody></table><div style="16px" text-align="left"> }<br></div></div><div style="16px"><span class=""> catch</span> ( <span class="">UnsupportedEncodingException</span> uee ) {<br></div><div style="16px"><span class=""> throw</span><span class="">new</span><span class="">CIFSException</span>(<br></div><div style="16px"><span class=""><span class=""> "</span>The default OEM encoding <span class="">"</span></span><span class="">+</span><span class="">SmbConstants<span class="">.</span>DEFAULT_OEM_ENCODING</span><span class="">+</span><span class=""><span class="">"</span> does not appear to be supported by this JRE.<span class="">"</span></span>);<br></div><div style="16px"> }<br></div><div style="16px" text-align="left"><br></div><div style="16px">I'm
not sure what "".getBytes() does underneath (reflection, class loading,
etc.?) and what could be causing the problem. Any ideas?<br></div><div style="16px"><br></div><div style="16px">Thanks,<br></div><div style="16px">Barry<br></div><div style="16px"><br></div><div style="16px"><br></div> </body>
</html>