LT
Leaning Technologiesdonquijote_sancho

Cheerpj hangs after "Jar is loaded,main is starting"

I am trying to use cheerpj to run my Java Swing app in a browser. I can run the example SwingSet3.jar example with no problems. However with my jar the process hangs at "Jar is loaded,main is starting" Is there anyway of logging where/why it gets stuck? I can run my app using java -jar , with no problems on Windows 10.
apignotti
apignotti96d ago
The most common problem is a misunderstanding of how /app/ works. Please share the HTML / JavaScript you are using. Also check the DevTools console and network tab for errors and 404s
donquijote_sancho
donquijote_sancho96d ago
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <script src="https://cjrtnc.leaningtech.com/3.0/cj3loader.js"></script> </head> <body> <script type="module"> await cheerpjInit(); cheerpjCreateDisplay(-1, -1, document.getElementById("container")); await cheerpjRunJar("/app/xfeb24.jar"); </script> <div id="container"></div> </body> <style> html, body { margin: 0; } #container { width: 100vw; height: 100svh; } </style> </html> What /where is the DevTools console? Thanks
apignotti
apignotti96d ago
The DevTools is a feature of modern browsers, not of CheerpJ The steps to open the DevTools depend on the browser, for Chrome it Ctrl+Shift+I Please search for the right sequence for your browser
donquijote_sancho
donquijote_sancho96d ago
It pauses on a line "debugger" and I see .... Local this : undefined a : TypeError: cb is not a function at Object.devRandomWrite [as writeAsync] (https://cjrtnc.leaningtech.com/3.0/cheerpOS.js:1859:9) at cheerpOSWrite (https://cjrtnc.leaningtech.com/3.0/cheerpOS.js:2127:23) at Yo (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:106923) at ah2 (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:352619) at US (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:400763) at wasm://wasm/00172642:wasm-function[144]:0x9152 at x7 (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:407857) at C8 (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:402398) at wasm://wasm/00172642:wasm-function[144]:0x9175 at x7 (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:407857) at ye (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:18999) at eval (eval at FI (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:413171), <anonymous>:9:18) at dx (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:31332) at Xl (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:13312) at eval (eval at b$ (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:61007), <anonymous>:1:97) at Vi (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:390068) at Ci (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:73822) at vy (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:11153) at J_4a5428 (eval at Dh (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:65414), <anonymous>:3:126) at Vi (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:389219) at Ci (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:73822) at Object.vy [as a0] (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:11153) at WE (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:70476) at MessagePort.WS (https://cjrtnc.leaningtech.com/3.0/cj3.js:1:20833) c : "cb is not a function"....
apignotti
apignotti96d ago
There is a bug in the handling of writes to /dev/random, a fix has been already pushed to master and I'll be able to share a fixed build in a few hours Please try again with this build: https://cjrtnc.leaningtech.com/3_20240212_364/cj3loader.js Please use the regular #cheerpj3 support channel for further problems
donquijote_sancho
donquijote_sancho96d ago
Thanks ... that worked. It opens up now!
Want results from more Discord servers?
Add your server
More Posts
Stretch to Fit Height IssueRunning a basic application in the example html provided on the CheerpJ website. My html code is efProblems with CheerpjHello, I am trying to get my Java app running in CheerPJ - I was successful in creating a simple "HeCache Results for Faster Startup?Hello new user here. Performing initial research into potential commercial application usage. 1) AmUnknownHostException happened when the Java application connect to serverUnknownHostException happened when the Java application connect to server. The host name is the sameHTTP server returned compressed partial data. That should not happen. CheerpJ cannot run.Browser shows error "HTTP server returned compressed partial data. That should not happen. CheerpJ cAccesing the standard out and standard error stream from the Java processHow do I from javascript access the output streams from the started Java process?Any plan on adding internet access without Tailscale?Hi there ! Do you plan on adding internet access without the need to install Tailscale etc, that wour[((0 + c) | 0)] is not a function when instantiating objectHello, thank you all for developing CheerpJ, it is an impressive tool! I am playing around with tryiI'm always looking for the URL of the latest build of cj3loader.js by searching articlesI'm always looking for the URL of the latest build of cj3loader.js by searching articles, but is theDifferent behavior between extension and cj3loaderWe have a java applet that runs perfectly when using the CheerpJ browser extension, but fails to fulCan I try CheerpX?I know it's not fully ready yet, but I think it's fine for my use cases in its current staterunning java decompiler in browser, weird error(copy-pasting from #cheerpj3 since i noticed this channel existed) i'm trying to run the procyon javAccessibility of Java applicationsHi team, I noticed that apps running on CheerpJ are not accessible to people with disabilities. Thisjnlp launch verification fails with 64 bit swt librariesThe launch has below error. Java.lang.unsatisfiesLinkError: cannot load 64-bit SWT libraries on 32-bhow to debug why the jar main class is not loadingI am trying to convert old jnlp client to html format. I followed the documentation and used cheerpjTrying to get CheerpJ to actually launch a programI'm trying to get CheerpJ to run UPRandomizer in a browser, but I can't figure out how to get it to Compiling .FMX with CheerpJHow do you convert .FMX with CheerpJ compiler?Any idea on how to use wildcards for jar files with many separate jar dependencies?I've been working on some projects and one of them involves a lot of dependencies in the form of jarCan I try CheerpX for Flash?From @sergo53: > Hi! I`d like to test the CheerpX for Flash... Where can I download the package? > NFile System EmulationI'm trying to get a file system emulation POC going. https://docs.leaningtech.com/cheerp/Filesystem-