Java App Cannot Find Files Through CheerpJ Virtual Filesystem
Hi, I have a Java application that I'm trying to run in the context of CheerpJ. The application reads image files from a relative path called "res/someimage.png". The app runs fine locally; the images load. I followed Alessandro's advice to use the absolute path "/files" virtual filesystem. Now, my Java app tries to access "/files/res/someimage.png". In my web server root, I have a subdirectory "res", which contains the various images. My .jar is in my server root. However, within the CheerpJ context, my app is still not loading the images. What am I doing wrong? Thanks in advance.
3 Replies
I think the “/app” virtual filesystem is your web server root, so maybe try “/app/res”. I always assumed that would let me reference files from my web server, though I’ve never tried it myself
Thank you for the suggestion, @jeffreportmill. I'll try that and write back if successful.
/app/res
is the right path to use, as Jeff suggested. /files
is the default location (cwd) where relative paths are resolved.