leaningtech / cheerpj-meta

Run Java 8 applications, libraries, applets, Java Web Start, and Oracle Forms on the web without legacy plugins.
https://labs.leaningtech.com/cheerpj
453 stars 21 forks source link

JPCApplet.jar hangs when downloading the disk image #198

Open mobluse opened 1 month ago

mobluse commented 1 month ago

JPCApplet.jar hangs when downloading the disk image when I use CheerpJ 3.0, see http://www.df.lth.se.orbin.se/~mikaelb/jpc/c.html. All files in folder is at http://www.df.lth.se.orbin.se/~mikaelb/jpc/default.html. Skärmbild 2024-07-11 152309 If I use CheerpJ 2.3, using the orange button (shield with bean), it also hangs.

JPC as applet works in IE mode in Edge with Java 8. Skärmbild 2024-07-11 152400

JPC source is here https://github.com/ianopolous/JPC, but the JPCApplet.jar is not in the release, but you can probably compile it yourself. There is also the old site with applets that doesn't load in CheerpJ 3.0 now: https://jpc.sourceforge.net/oldsite/index.html

alexp-sssup commented 1 month ago

Thank for reporting this bug, this test case depends on some unusual code patterns that were not well support by CheerpJ.

We have fixed multiple bugs, and a new build is available here: https://cjrtnc.leaningtech.com/3_20240721_511/cj3loader.js

Please note that the emulator can now boot, but it will still freeze later on. Unfortunately it has infinitely looping Java threads that are very difficult to efficiently support, since the browser fundamentally lacks preemption.

We plan to eventually work around this problem, and we will keep this bug open as a reference test case.