CesiumResource from local file

I'm trying to add a CesiumResource from a local file to be embedded into the CZML file. When I generate the URI using a full URL this process works just fine but I have to have the server up and running at the time the script is run to make sure that the resource is available:

Billboard_res = new CesiumResource(new URI("http://localhost:8080/Apps/images/satellite1.png"),CesiumResourceBehavior.EMBED);
      
I would much rather have the file in the same directory as the java script and generate the URI from the relative path like this:
Billboard_res = new CesiumResource(new URI("file:///satellite1.png"),CesiumResourceBehavior.EMBED);

For some reason this doesn't work and I always get the error:
Exception in thread "main" java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection

Thank you for your help.

This was fixed in February. I assume you’re not using the latest version of the czml-writer library?

https://github.com/AnalyticalGraphicsInc/czml-writer/commit/ee4094b6f673358d1bd54aa00b0946f79dfba7be

Thank you for your post Scott, the class you are referring to seems to be a different class than I'm using in my code.
I use:
import agi.foundation.cesium.CzmlDocument;

OK, you’re using STK Components for Java then (a commercial AGI product). The fix is in version 2016r1 and newer.

Great, I just checked and I'm still on 2015r3. I guess it is time to update to the new version.
Thank you for your support.