Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 jdk.jpackage.jmod - JPackage Tool
JDK 17 jdk.jpackage.jmod is the JMOD file for JDK 17 JPackage tool, which can be invoked by the "jpackage" command.
JDK 17 JPackage tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jpackage.jmod.
JDK 17 JPackage tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JPackage tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jpackage.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jpackage/internal/MacBaseInstallerBundler.java
/* * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.jpackage.internal; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; import java.nio.file.Files; import java.nio.file.Path; import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; import static jdk.jpackage.internal.StandardBundlerParam.APP_NAME; import static jdk.jpackage.internal.StandardBundlerParam.INSTALLER_NAME; import static jdk.jpackage.internal.StandardBundlerParam.INSTALL_DIR; import static jdk.jpackage.internal.StandardBundlerParam.PREDEFINED_APP_IMAGE; import static jdk.jpackage.internal.StandardBundlerParam.VERSION; import static jdk.jpackage.internal.StandardBundlerParam.SIGN_BUNDLE; public abstract class MacBaseInstallerBundler extends AbstractBundler { public final BundlerParamInfo<Path> APP_IMAGE_TEMP_ROOT = new StandardBundlerParam<>( "mac.app.imageRoot", Path.class, params -> { Path imageDir = IMAGES_ROOT.fetchFrom(params); try { if (!IOUtils.exists(imageDir)) { Files.createDirectories(imageDir); } return Files.createTempDirectory( imageDir, "image-"); } catch (IOException e) { return imageDir.resolve(getID()+ ".image"); } }, (s, p) -> Path.of(s)); public static final BundlerParamInfo<String> SIGNING_KEY_USER = new StandardBundlerParam<>( Arguments.CLIOptions.MAC_SIGNING_KEY_NAME.getId(), String.class, params -> "", null); public static final BundlerParamInfo<String> SIGNING_KEYCHAIN = new StandardBundlerParam<>( Arguments.CLIOptions.MAC_SIGNING_KEYCHAIN.getId(), String.class, params -> "", null); public static final BundlerParamInfo<String> MAC_INSTALLER_NAME = new StandardBundlerParam<> ( "mac.installerName", String.class, params -> { String nm = INSTALLER_NAME.fetchFrom(params); if (nm == null) return null; String version = VERSION.fetchFrom(params); if (version == null) { return nm; } else { return nm + "-" + version; } }, (s, p) -> s); protected static String getInstallDir( Map<String, ? super Object> params, boolean defaultOnly) { String returnValue = INSTALL_DIR.fetchFrom(params); if (defaultOnly && returnValue != null) { Log.info(I18N.getString("message.install-dir-ignored")); returnValue = null; } if (returnValue == null) { if (StandardBundlerParam.isRuntimeInstaller(params)) { returnValue = "/Library/Java/JavaVirtualMachines"; } else { returnValue = "/Applications"; } } return returnValue; } public MacBaseInstallerBundler() { appImageBundler = new MacAppBundler().setDependentTask(true); } protected void validateAppImageAndBundeler( Map<String, ? super Object> params) throws ConfigException { if (PREDEFINED_APP_IMAGE.fetchFrom(params) != null) { Path applicationImage = PREDEFINED_APP_IMAGE.fetchFrom(params); if (!IOUtils.exists(applicationImage)) { throw new ConfigException( MessageFormat.format(I18N.getString( "message.app-image-dir-does-not-exist"), PREDEFINED_APP_IMAGE.getID(), applicationImage.toString()), MessageFormat.format(I18N.getString( "message.app-image-dir-does-not-exist.advice"), PREDEFINED_APP_IMAGE.getID())); } if (APP_NAME.fetchFrom(params) == null) { throw new ConfigException( I18N.getString("message.app-image-requires-app-name"), I18N.getString( "message.app-image-requires-app-name.advice")); } if (Optional.ofNullable( SIGN_BUNDLE.fetchFrom(params)).orElse(Boolean.FALSE)) { // if signing bundle with app-image, warn user if app-image // is not already signed. try { if (!(AppImageFile.load(applicationImage).isSigned())) { Log.info(MessageFormat.format(I18N.getString( "warning.unsigned.app.image"), getID())); } } catch (IOException ioe) { // Ignore - In case of a forign or tampered with app-image, // user is notified of this when the name is extracted. } } } else { appImageBundler.validate(params); } } protected Path prepareAppBundle(Map<String, ? super Object> params) throws PackagerException { Path predefinedImage = StandardBundlerParam.getPredefinedAppImage(params); if (predefinedImage != null) { return predefinedImage; } Path appImageRoot = APP_IMAGE_TEMP_ROOT.fetchFrom(params); return appImageBundler.execute(params, appImageRoot); } @Override public String getBundleType() { return "INSTALLER"; } public static String findKey(String keyPrefix, String teamName, String keychainName) { boolean useAsIs = teamName.startsWith(keyPrefix) || teamName.startsWith("Developer ID") || teamName.startsWith("3rd Party Mac"); String key = (useAsIs) ? teamName : (keyPrefix + teamName); try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos)) { List<String> searchOptions = new ArrayList<>(); searchOptions.add("/usr/bin/security"); searchOptions.add("find-certificate"); searchOptions.add("-c"); searchOptions.add(key); searchOptions.add("-a"); if (keychainName != null && !keychainName.isEmpty()) { searchOptions.add(keychainName); } ProcessBuilder pb = new ProcessBuilder(searchOptions); IOUtils.exec(pb, false, ps); Pattern p = Pattern.compile("\"alis\"<blob>=\"([^\"]+)\""); Matcher m = p.matcher(baos.toString()); if (!m.find()) { Log.error(MessageFormat.format(I18N.getString( "error.cert.not.found"), key, keychainName)); return null; } String matchedKey = m.group(1); if (m.find()) { Log.error(MessageFormat.format(I18N.getString( "error.multiple.certs.found"), key, keychainName)); } return matchedKey; } catch (IOException ioe) { Log.verbose(ioe); return null; } } private final Bundler appImageBundler; }
⏎ jdk/jpackage/internal/MacBaseInstallerBundler.java
Or download all of them as a single archive file:
File name: jdk.jpackage-17.0.5-src.zip File size: 92069 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jshell.jmod - JShell Tool
2023-08-03, 2158👍, 0💬
Popular Posts:
commons-collections4-4.2 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...
commons-lang-1.0.1.jar is the JAR file for Apache Commons Lang 1.0.1, which provides a host of helpe...
JDK 11 jdk.crypto.cryptoki.jmod is the JMOD file for JDK 11 Crypto Cryptoki module. JDK 11 Crypto KI...
Apache Neethi provides general framework for the programmers to use WS Policy. It is compliant with ...
JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" co...