BFergerson/Journey

Understanding difference between online and offline

Closed this issue · 4 comments

Thank you very much for developing this!

I have a question about the online and offline libraries. If we use the online version, what does that mean? When would it need to go online to get something?

@rpmargetts, the offline and online versions are exactly the same except the online version will download JCEF/CEF assets whereas the offline version comes with them pre-packed inside the .jar.

The only time the online version will download the JCEF/CEF assets is if it can't find them locally.
By default they are stored at:

  • /tmp/journey-69 (macOS)
  • /tmp/journey-75 (Linux)
  • %TEMP%/journey-75 (Windows)

Thanks, I can see it has downloaded them to the temp folder C:\Users\myname\AppData\Local\Temp\journey-75 on my Windows machine.

At what point does it do the download? Is there a way of knowing that all is ready for use before I use loadUrl?

If it does not find the correct jcef-distrib-*.zip in that folder it will re-download it. That's the only file it downloads and marks the only difference between the offline and online versions (the same .zip files are what's inside the offline version).

Once that .zip file is in the correct location it will extract it and continue on as normal. If some of those files that were in the .zip file end up missing, it'll extract the same .zip file again during boot. That should fix any issues granted the .zip file hasn't been corrupted. If that's been corrupted then you'll get an exception during boot.

Thanks, that's helpful. And I see now that there is a JourneyLoaderListener to follow what it is doing and when the loading is complete.