<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello Ethan,</p>
    <p>This seems to be a reasonable enhancement request. I have filed
      <a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8355572">https://bugs.openjdk.org/browse/JDK-8355572</a> to track this.</p>
    <p>Given other priority tasks, this enhancement may not be worked
      upon soon. However, on first sight, this appears to be a
      reasonably sized change isolated to a very specific part of the
      code. So if you or anyone else would like to contribute to this
      enhancement, please send a message to this mailing list (the
      contribution guide is here <a class="moz-txt-link-freetext" href="https://openjdk.org/guide/">https://openjdk.org/guide/</a>). I think
      this enhancement would require a bit of experimenting with the
      code and some back and forth discussions. That's OK and can be
      done here in this mailing list.</p>
    <p>-Jaikiran<br>
    </p>
    <div class="moz-cite-prefix">On 23/04/25 7:53 pm, Ethan McCue wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+NR86i1L0B=7GbUMYQMdg6aFx0P-o5SA1T8nAJ=M8mFpxFDiw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
              moz-do-not-send="true" class="moz-txt-link-freetext">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></div>
      </div>
    </blockquote>
  </body>
</html>