Java Jar Usage createPacker()

Here you can find the source of createPacker()

Description

create Packer

License

Open Source License

Declaration

public static final Packer createPacker() 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2010 BSI Business Systems Integration AG.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * //from w  w w.  j a  va2 s  . co m
 * Contributors:
 *     BSI Business Systems Integration AG - initial API and implementation
 ******************************************************************************/

import java.util.SortedMap;
import java.util.jar.Pack200;
import java.util.jar.Pack200.Packer;

public class Main {
    public static final Packer createPacker() {
        Pack200.Packer p = Pack200.newPacker();
        SortedMap<String, String> props = p.properties();
        //    props.put(Pack200.Packer.KEEP_FILE_ORDER, Pack200.Packer.TRUE);
        props.put(Pack200.Packer.MODIFICATION_TIME, Pack200.Packer.KEEP);
        props.put(Pack200.Packer.EFFORT, "0");
        //    props.put(Pack200.Packer.CODE_ATTRIBUTE_PFX+"LocalVariableTable", Pack200.Packer.STRIP);
        return p;
    }
}

Related

  1. allocateReadOnlyI18nDictionary(final Attributes attributes, final ResourceBundle resourceBundle)
  2. checkJarValidity(String path)
  3. containsClass(JarFile jarFile, String agentRunnerClassName)
  4. containsClass(JarFile jarFile, String classFilePath)
  5. convertAttributes(Attributes attributes)
  6. findClassesByJar(String packageName, JarFile jar, final boolean recursive, Set> classes)
  7. getAttribute(String name, String value)
  8. getClassNameByJar(String jarPath, boolean childPackage)
  9. getEntriesName(String jarFileName)