Closed ghost closed 6 years ago
Hi, i have notice that there is a bug when you retrieve the cacheDir while starting SpringBoot Application. If i set the cacheDir like --cache-dir=USERLIB/MyApp then.
i think that instead of
superLauncher.getManifest().cacheDir;
is better to use
this.superLauncher.getManifest().resolveCacheDir(this.getParameters().getNamed())
in the method below, to correctly resolve the USERLIB dir.
private void startApplication() throws Exception { if (app != null) { ParametersImpl.registerParameters(app, new LauncherParams(getParameters(), superLauncher.getManifest())); PlatformImpl.setApplicationName(app.getClass()); superLauncher.setPhase("Application Init"); app.start(primaryStage); } else { // Start any executable jar (i.E. Spring Boot); List<LibraryFile> files = superLauncher.getManifest().files; String cacheDir = superLauncher.getManifest().cacheDir; String command = String.format("java -jar %s/%s", cacheDir, files.get(0).file); log.info(String.format("Execute command '%s'", command)); Runtime.getRuntime().exec(command); } }
Thank you, I've committed a fix :)
Hi, i have notice that there is a bug when you retrieve the cacheDir while starting SpringBoot Application. If i set the cacheDir like --cache-dir=USERLIB/MyApp then.
i think that instead of
is better to use
in the method below, to correctly resolve the USERLIB dir.