< prev index next >

src/jdk.incubator.jpackage/share/classes/jdk/incubator/jpackage/internal/DeployParams.java

Print this page

        

*** 260,269 **** --- 260,294 ---- if (contents != null && contents.length > 0) { throw new PackagerException("ERR_BuildRootInvalid", root); } } + // Validate resource dir + String resources = (String)bundlerArguments.get( + Arguments.CLIOptions.RESOURCE_DIR.getId()); + if (resources != null) { + if (!(new File(resources)).exists()) { + throw new PackagerException( + "message.resource-dir-does-not-exist", + Arguments.CLIOptions.RESOURCE_DIR.getId(), resources); + } + } + + // Validate predefined runtime dir + String runtime = (String)bundlerArguments.get( + Arguments.CLIOptions.PREDEFINED_RUNTIME_IMAGE.getId()); + if (runtime != null) { + if (!(new File(runtime)).exists()) { + throw new PackagerException( + "message.runtime-image-dir-does-not-exist", + Arguments.CLIOptions.PREDEFINED_RUNTIME_IMAGE.getId(), + runtime); + } + } + + + // Validate license file if set String license = (String)bundlerArguments.get( Arguments.CLIOptions.LICENSE_FILE.getId()); if (license != null) { File licenseFile = new File(license);
< prev index next >