Package java.util.jar

Examples of java.util.jar.JarOutputStream.finish()


    jstream.putNextEntry(ze);
    jstream.closeEntry();
    ze = new ZipEntry("lib/lib2.jar");
    jstream.putNextEntry(ze);
    jstream.closeEntry();
    jstream.finish();
    jstream.close();
    jobConf.setJar(jobJarFile.toURI().toString());
  }

  /**
 
View Full Code Here


    try {
      fstream = new FileOutputStream(jarFilename);
      jstream = new JarOutputStream(fstream);

      addClassFilesFromDir(new File(jarOutDir), jstream);
      jstream.finish();
    } finally {
      if (null != jstream) {
        try {
          jstream.close();
        } catch (IOException ioe) {
View Full Code Here

    jstream.putNextEntry(ze);
    jstream.closeEntry();
    ze = new ZipEntry("lib/lib2.jar");
    jstream.putNextEntry(ze);
    jstream.closeEntry();
    jstream.finish();
    jstream.close();
    jobConf.setJar(jobJarFile.toURI().toString());
  }

  /**
 
View Full Code Here

    try {
      fstream = new FileOutputStream(jarFilename);
      jstream = new JarOutputStream(fstream);

      addClassFilesFromDir(new File(jarOutDir), jstream);
      jstream.finish();
    } finally {
      if (null != jstream) {
        try {
          jstream.close();
        } catch (IOException ioe) {
View Full Code Here

    try {
      fstream = new FileOutputStream(jarFilename);
      jstream = new JarOutputStream(fstream);

      addClassFilesFromDir(new File(jarOutDir), jstream);
      jstream.finish();
    } finally {
      if (null != jstream) {
        try {
          jstream.close();
        } catch (IOException ioe) {
View Full Code Here

        jos.closeEntry();
        // Put su artifact
        for (int i = 0; i < suName.length; i++) {
            jos.putNextEntry(new ZipEntry(suName[i] + ".zip"));
            JarOutputStream jos2 = new JarOutputStream(jos, new Manifest());
            jos2.finish();
            jos2.flush();
            jos.closeEntry();
        }
        // Close jar
        jos.close();
View Full Code Here

    jstream.putNextEntry(ze);
    jstream.closeEntry();
    ze = new ZipEntry("lib/lib2.jar");
    jstream.putNextEntry(ze);
    jstream.closeEntry();
    jstream.finish();
    jstream.close();
   
    Path jobJarPath = new Path(getTestRootDir().makeQualified(hdfs), "jobjar-on-hdfs.jar");
    hdfs.moveFromLocalFile(new Path(jobJarFile.toURI().toString()), jobJarPath);
    if (jobJarFile.exists()) {  // just to make sure
View Full Code Here

    try {
      fstream = new FileOutputStream(jarFilename);
      jstream = new JarOutputStream(fstream);

      addClassFilesFromDir(new File(jarOutDir), jstream);
      jstream.finish();
    } finally {
      if (null != jstream) {
        try {
          jstream.close();
        } catch (IOException ioe) {
View Full Code Here

  private void buildJarFile() throws IOException, FileNotFoundException{
    Manifest manifest = new ManifestBuilder().buildManifest();
    JarOutputStream out = new JarOutputStream(new FileOutputStream(new File(targetDirectory, "release.jar")), manifest);
    new JarBuilder(out).addFiles(new ClassesToPackChooser(new File("./bin")).getAllClasses());
    out.finish();
    out.close();
  }
 
  private void moveScripts() throws IOException{
    new DirectoryMover(new File("./scripts"), new File(targetDirectory, "scripts")).move();
View Full Code Here

  private void buildJarFile() throws IOException{
    Manifest manifest = new ManifestBuilder().buildManifest();
    JarOutputStream out = new JarOutputStream(new FileOutputStream(new File(targetDirectory, "release.jar")), manifest);
    new JarBuilder(out).addFiles(new ClassesToPackChooser(new File("./bin")).getAllClasses());
    out.finish();
    out.close();
  }

  private void moveScripts() throws IOException{
    new DirectoryMover(new File("./scripts"), new File(targetDirectory, "scripts")).move();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.