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 11 jdk.jlink.jmod - JLink Tool
JDK 11 jdk.jlink.jmod is the JMOD file for JDK 11 JLink tool, which can be invoked by the "jlink" command.
JDK 11 JLink tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jlink.jmod.
JDK 11 JLink tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JLink tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jlink.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/tools/jlink/internal/DirArchive.java
/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.tools.jlink.internal; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.stream.Stream; /** * An Archive backed by a directory. */ public class DirArchive implements Archive { /** * A File located in a Directory. */ private class FileEntry extends Archive.Entry { private final long size; private final Path path; FileEntry(Path path, String name) { super(DirArchive.this, getPathName(path), name, Archive.Entry.EntryType.CLASS_OR_RESOURCE); this.path = path; try { size = Files.size(path); } catch (IOException ex) { throw new RuntimeException(ex); } } /** * Returns the number of bytes of this file. */ @Override public long size() { return size; } @Override public InputStream stream() throws IOException { InputStream stream = Files.newInputStream(path); open.add(stream); return stream; } } private static final String MODULE_INFO = "module-info.class"; private final Path dirPath; private final String moduleName; private final List<InputStream> open = new ArrayList<>(); private final int chop; private final Consumer<String> log; private static final Consumer<String> noopConsumer = (String t) -> { }; public DirArchive(Path dirPath, String moduleName) { this(dirPath, moduleName, noopConsumer); } public DirArchive(Path dirPath, String moduleName, Consumer<String> log) { Objects.requireNonNull(dirPath); if (!Files.isDirectory(dirPath)) { throw new IllegalArgumentException(dirPath + " is not a directory"); } chop = dirPath.toString().length() + 1; this.moduleName = Objects.requireNonNull(moduleName); this.dirPath = dirPath; this.log = log; } @Override public String moduleName() { return moduleName; } @Override public Path getPath() { return dirPath; } @Override public Stream<Entry> entries() { try { return Files.walk(dirPath).map(this::toEntry).filter(n -> n != null); } catch (IOException ex) { throw new RuntimeException(ex); } } private Archive.Entry toEntry(Path p) { if (Files.isDirectory(p)) { return null; } String name = getPathName(p).substring(chop); log.accept(moduleName + "/" + name); return new FileEntry(p, name); } @Override public void close() throws IOException { IOException e = null; for (InputStream stream : open) { try { stream.close(); } catch (IOException ex) { if (e == null) { e = ex; } else { e.addSuppressed(ex); } } } if (e != null) { throw e; } } @Override public void open() throws IOException { // NOOP } private static String getPathName(Path path) { return path.toString().replace(File.separatorChar, '/'); } }
⏎ jdk/tools/jlink/internal/DirArchive.java
Or download all of them as a single archive file:
File name: jdk.jlink-11.0.1-src.zip File size: 155677 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jshell.jmod - JShell Tool
2020-06-30, 25241👍, 0💬
Popular Posts:
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
How to run "jarsigner" command from JDK tools.jar file? "jarsigner" command allows you to digitally ...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.5.0-src.zip...
How to display XML element type information with the jaxp\TypeInfoWriter.java provided in the Apache...