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:
JRE 8 rt.jar - java.* Package Source Code
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime environment included in JDK 8. JRE 8 rt.jar libraries are divided into 6 packages:
com.* - Internal Oracle and Sun Microsystems libraries java.* - Standard Java API libraries. javax.* - Extended Java API libraries. jdk.* - JDK supporting libraries. org.* - Third party libraries. sun.* - Old libraries developed by Sun Microsystems.
JAR File Information:
Directory of C:\fyicenter\jdk-1.8.0_191\jre\lib 63,596,151 rt.jar
Here is the list of Java classes of the java.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ java/nio/file/CopyMoveHelper.java
/* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.nio.file; import java.nio.file.attribute.*; import java.io.InputStream; import java.io.IOException; /** * Helper class to support copying or moving files when the source and target * are associated with different providers. */ class CopyMoveHelper { private CopyMoveHelper() { } /** * Parses the arguments for a file copy operation. */ private static class CopyOptions { boolean replaceExisting = false; boolean copyAttributes = false; boolean followLinks = true; private CopyOptions() { } static CopyOptions parse(CopyOption... options) { CopyOptions result = new CopyOptions(); for (CopyOption option: options) { if (option == StandardCopyOption.REPLACE_EXISTING) { result.replaceExisting = true; continue; } if (option == LinkOption.NOFOLLOW_LINKS) { result.followLinks = false; continue; } if (option == StandardCopyOption.COPY_ATTRIBUTES) { result.copyAttributes = true; continue; } if (option == null) throw new NullPointerException(); throw new UnsupportedOperationException("'" + option + "' is not a recognized copy option"); } return result; } } /** * Converts the given array of options for moving a file to options suitable * for copying the file when a move is implemented as copy + delete. */ private static CopyOption[] convertMoveToCopyOptions(CopyOption... options) throws AtomicMoveNotSupportedException { int len = options.length; CopyOption[] newOptions = new CopyOption[len+2]; for (int i=0; i<len; i++) { CopyOption option = options[i]; if (option == StandardCopyOption.ATOMIC_MOVE) { throw new AtomicMoveNotSupportedException(null, null, "Atomic move between providers is not supported"); } newOptions[i] = option; } newOptions[len] = LinkOption.NOFOLLOW_LINKS; newOptions[len+1] = StandardCopyOption.COPY_ATTRIBUTES; return newOptions; } /** * Simple copy for use when source and target are associated with different * providers */ static void copyToForeignTarget(Path source, Path target, CopyOption... options) throws IOException { CopyOptions opts = CopyOptions.parse(options); LinkOption[] linkOptions = (opts.followLinks) ? new LinkOption[0] : new LinkOption[] { LinkOption.NOFOLLOW_LINKS }; // attributes of source file BasicFileAttributes attrs = Files.readAttributes(source, BasicFileAttributes.class, linkOptions); if (attrs.isSymbolicLink()) throw new IOException("Copying of symbolic links not supported"); // delete target if it exists and REPLACE_EXISTING is specified if (opts.replaceExisting) { Files.deleteIfExists(target); } else if (Files.exists(target)) throw new FileAlreadyExistsException(target.toString()); // create directory or copy file if (attrs.isDirectory()) { Files.createDirectory(target); } else { try (InputStream in = Files.newInputStream(source)) { Files.copy(in, target); } } // copy basic attributes to target if (opts.copyAttributes) { BasicFileAttributeView view = Files.getFileAttributeView(target, BasicFileAttributeView.class); try { view.setTimes(attrs.lastModifiedTime(), attrs.lastAccessTime(), attrs.creationTime()); } catch (Throwable x) { // rollback try { Files.delete(target); } catch (Throwable suppressed) { x.addSuppressed(suppressed); } throw x; } } } /** * Simple move implements as copy+delete for use when source and target are * associated with different providers */ static void moveToForeignTarget(Path source, Path target, CopyOption... options) throws IOException { copyToForeignTarget(source, target, convertMoveToCopyOptions(options)); Files.delete(source); } }
⏎ java/nio/file/CopyMoveHelper.java
Or download all of them as a single archive file:
File name: jre-rt-java-1.8.0_191-src.zip File size: 6664831 bytes Release date: 2018-10-28 Download
⇒ JRE 8 rt.jar - javax.* Package Source Code
2023-08-23, 249260👍, 4💬
Popular Posts:
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
MXP1 is a stable XmlPull parsing engine that is based on ideas from XPP and in particular XPP2 but c...
How to download and install JDK (Java Development Kit) 5? If you want to write Java applications, yo...
What is the dom\GetElementsByTagName .javaprovided in the Apache Xerces package? I have Apache Xerce...
How to run "jar" command from JDK tools.jar file? "jar" is the JAR (Java Archive) file management co...