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.jlink.jmod - JLink Tool
JDK 17 jdk.jlink.jmod is the JMOD file for JDK 17 JLink tool, which can be invoked by the "jlink" command.
JDK 17 JLink tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jlink.jmod.
JDK 17 JLink tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JLink tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jlink.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/tools/jmod/JmodOutputStream.java
/* * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.tools.jmod; import java.io.BufferedOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import jdk.internal.jmod.JmodFile; import static jdk.internal.jmod.JmodFile.*; /** * Output stream to write to JMOD file */ class JmodOutputStream extends OutputStream implements AutoCloseable { private final Map<Section, Set<String>> entries = new HashMap<>(); /** * This method creates (or overrides, if exists) the JMOD file, * returning the the output stream to write to the JMOD file. */ static JmodOutputStream newOutputStream(Path file) throws IOException { OutputStream out = Files.newOutputStream(file); BufferedOutputStream bos = new BufferedOutputStream(out); return new JmodOutputStream(bos); } private final ZipOutputStream zos; private JmodOutputStream(OutputStream out) { this.zos = new ZipOutputStream(out); try { JmodFile.writeMagicNumber(out); } catch (IOException e) { throw new UncheckedIOException(e); } } /** * Writes the input stream to the named entry of the given section. */ public void writeEntry(InputStream in, Section section, String name) throws IOException { ZipEntry ze = newEntry(section, name); zos.putNextEntry(ze); in.transferTo(zos); zos.closeEntry(); } /** * Writes the given bytes to the named entry of the given section. */ public void writeEntry(byte[] bytes, Section section, String path) throws IOException { ZipEntry ze = newEntry(section, path); zos.putNextEntry(ze); zos.write(bytes); zos.closeEntry(); } /** * Writes the given entry to the given input stream. */ public void writeEntry(InputStream in, Entry e) throws IOException { ZipEntry e1 = e.zipEntry(); // Only preserve attributes which won't change by // inflating and deflating the entry. See: // sun.tools.jar.Main.update() ZipEntry e2 = new ZipEntry(e1.getName()); e2.setMethod(e1.getMethod()); e2.setTime(e1.getTime()); e2.setComment(e1.getComment()); e2.setExtra(e1.getExtra()); if (e1.getMethod() == ZipEntry.STORED) { e2.setSize(e1.getSize()); e2.setCrc(e1.getCrc()); } zos.putNextEntry(e2); zos.write(in.readAllBytes()); zos.closeEntry(); } private ZipEntry newEntry(Section section, String path) throws IOException { if (contains(section, path)) { throw new IOException("duplicate entry: " + path + " in section " + section); } String prefix = section.jmodDir(); String name = Paths.get(prefix, path).toString() .replace(File.separatorChar, '/'); entries.get(section).add(path); return new ZipEntry(name); } public boolean contains(Section section, String path) { Set<String> set = entries.computeIfAbsent(section, k -> new HashSet<>()); return set.contains(path); } @Override public void write(int b) throws IOException { zos.write(b); } @Override public void close() throws IOException { zos.close(); } }
⏎ jdk/tools/jmod/JmodOutputStream.java
Or download all of them as a single archive file:
File name: jdk.jlink-17.0.5-src.zip File size: 164180 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jpackage.jmod - JPackage Tool
2023-08-03, 3495👍, 0💬
Popular Posts:
How to download and install ojdbc11.jar for Oracle 21c? ojdbc11.jar for Oracle 21c is a Java JDBC Dr...
Smack is an Open Source XMPP (Jabber) client library for instant messaging and presence. A pure Java...
How to download and install ojdbc14.jar for Oracle 10g R2? ojdbc14.jar for Oracle 10g R2 is a Java 1...
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...
What Is HttpComponents httpcore-4.4.6.jar? HttpComponents httpcore-4.4.6.jar is the JAR file for Apa...