<div dir="ltr"><div>I recently encountered a case where it would have been beneficial if jwebserver supported the Range header.<br><br>Specifically, there was a learner who made a swing app and wanted to bundle it as an exe or put it on the internet. The path we guided him through was essentially<br><br><font face="monospace">javac -d compiled --source-path src src/Main.java</font><br><font face="monospace">jar --create --file project.jar --main-class Main -C src . -C compiled .</font><br><br><font face="arial, sans-serif">So they had a fully runnable jar. From there it was a bit of a lesson on resources vs. files so that the jar could run self contained, then on to launch4j because it can make the self contained exe they were looking for.<br><br>The other thing they wanted was the browser. Looking into the cheerpj - the wasm jvm - it seemed as if we could also get that working pretty easily. Their code was amenable to </font><font face="monospace">--release 11</font><font face="arial, sans-serif"> and that's where Cheerpj support currently stops (though they have stated plans to support the latest jdk.)<br><br>There were two issues with this. One is either a bug in cheerpj or their app, still investigating. The other is that cheerpj requires support of the Range header on whatever server is serving the jar + html file.<br><br>So ideally i would have liked to show them this html and had them run jwebserver to see their jar run in a browser.<br><br></font><font face="monospace"><!doctype html><br><html lang="en"><br><head><br>    <meta charset="utf-8" /><br>    <title>CheerpJ test</title><br>    <script src="<a href="https://cjrtnc.leaningtech.com/4.0/loader.js">https://cjrtnc.leaningtech.com/4.0/loader.js</a>"></script><br></head><br><body><br><script><br>    (async function () {<br>        await cheerpjInit({version: 11});<br>        cheerpjCreateDisplay(800, 600);<br>        await cheerpjRunJar("/app/project.jar");<br>    })();<br></script><br></body><br></html></font><font face="arial, sans-serif"></font></div>
</div>