Use nresource=[native jar] to add contents of resource to java.library.path

This feature makes use of the current caching system for "code" jars. Resources marked by nresource are copied to specific cache directories, unpacked, and then the caches are added to the applications java.library.path. This "native" cache is cleaned according to "cache_retention_days", similar to the code cache.
This commit is contained in:
vsolanki
2018-12-05 11:45:48 -05:00
parent 9f2071f152
commit 86723193e6
8 changed files with 233 additions and 17 deletions
@@ -46,10 +46,10 @@ public class ClassPathsTest
when(_application.getCodeCacheRetentionDays()).thenReturn(1);
Path firstCachedJarFile = _appdir.getRoot().toPath().
resolve(ClassPaths.CACHE_DIR).resolve("fi").resolve("first.jar");
resolve(Application.CACHE_DIR + "/code").resolve("fi").resolve("first.jar");
Path secondCachedJarFile = _appdir.getRoot().toPath().
resolve(ClassPaths.CACHE_DIR).resolve("se").resolve("second.jar");
resolve(Application.CACHE_DIR + "/code").resolve("se").resolve("second.jar");
String expectedClassPath = firstCachedJarFile.toAbsolutePath() + File.pathSeparator +
secondCachedJarFile.toAbsolutePath();