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
434 stars 21 forks source link

java.io.FileNotFoundException ocurred when create fileInputStream #180

Closed aidscooler closed 5 months ago

aidscooler commented 5 months ago

the issue I opened yesterday java.io.FileNotFoundException ocurred when create fileInputStream I mean the exception was occured at this code: const fileStream = await new FileInputStream(file) it seems the argument file is taken as a file path,actually it is a File type argument. I'm also wondering if there is anyway to run CheerpJ locally,because some .jar file couldn't be downloaded due to network problem , see the error message below : GET https://cjrtnc.leaningtech.com/3.0rc2/8/resources.jar net::ERR_CACHE_OPERATION_NOT_SUPPORTED I've noticed this problem several times and the name of .jar file which couldn't be downloaded is different everytime. QQ截图20240127122049

alexp-sssup commented 5 months ago

I am not sure what File is here, is that a JavaScript File type? That is obviously not something can Java code can directly use.

You can load the File data from JavaScript and store it into the /str/ filesystem. See here for more info: https://labs.leaningtech.com/cheerpj3/guides/File-System-support#str-mount-point

ERR_CACHE_OPERATION_NOT_SUPPORTED is a message from the browser and not an actual error.

Self-hosting CheerpJ is possible, but only for commercial users.

Considering joining Discord for further support: https://discord.gg/X9ruPkchM5