I'm having problems with the ZipJarCrawler data provider. I have the
following code:
DataProvidersManager.getInstance().clearProviders();
DataProvidersManager.getInstance().addProvider(new
DirectoryCrawler(myDirectory));
where myDirectory is a File object to my data folder, and the program works
perfectly fine. I now insert my data folder into the project JAR file and
replace those two lines with:
DataProvidersManager.getInstance().clearProviders();
DataProvidersManager.getInstance().addProvider(new ZipJarCrawler(myJar));
where myJar is a File object with the path to the JAR file. In this case
the program throws an IO exception with the message "Stream closed", which
is captured by an Orekit exception with the following stack trace:
org.orekit.data.ZipJarCrawler.feed(ZipJarCrawler.java:167)
org.orekit.data.DataProvidersManager.feed(DataProvidersManager.java:332)
org.orekit.frames.RapidDataAndPredictionXMLLoader.fillHistory1980(RapidDataAndPredictionXMLLoader.java:110)
org.orekit.frames.FramesFactory.getEOP1980History(FramesFactory.java:284)
org.orekit.frames.GTODProvider.<init>(GTODProvider.java:72)
org.orekit.frames.FramesFactory.getGTOD(FramesFactory.java:916)
and my project files from here on.
The data files are definitely in the JAR file, under a subdirectory called
data/orekit. Since the documentation says that the search is recursive the
data provider should be able to find the data files. I'm using the Orekit
6.0 release. What am I doing wrong?