--- old/make/src/classes/build/tools/buildmetaindex/BuildMetaIndex.java 2016-02-16 18:47:52.000000000 +0000 +++ /dev/null 2016-02-16 18:47:53.000000000 +0000 @@ -1,398 +0,0 @@ -/* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package build.tools.buildmetaindex; - -import java.io.*; -import java.util.*; -import java.util.jar.*; - -/** Constructs a meta-index of the specified jar files. The meta-index - contains prefixes of packages contained in these jars, indexed by - the jar file name. It is intended to be consumed by the JVM to - allow the boot class loader to be made lazier. For example, when - class data sharing is enabled, the presence of the meta-index - allows the JVM to skip opening rt.jar if all of the dependent - classes of the application are in the shared archive. A similar - mechanism could be useful at the application level as well, for - example to make the extension class loader lazier. - -
The contents of the meta-index file for jre/lib look something - like this: - -
-% VERSION 2 -# charsets.jar -sun/ -# jce.jar -javax/ -! jsse.jar -sun/ -com/sun/net/ -javax/ -com/sun/security/ -! rt.jar -org/w3c/ -com/sun/image/ -com/sun/org/ -com/sun/imageio/ -com/sun/accessibility/ -javax/ -... -- -
It is a current invariant of the code in the JVM which
- consumes the meta-index that the meta-index indexes only jars in
- one directory. It is acceptable for jars in that directory to not
- be mentioned in the meta-index. The meta-index is designed more to
- be able to perform a quick rejection test of the presence of a
- particular class in a particular jar file than to be a precise
- index of the contents of the jar. */
-
-public class BuildMetaIndex {
- public static void main(String[] args) throws IOException {
- /* The correct usage of this class is as following:
- * java BuildMetaIndex -o