Code example for Attributes

Methods: put

0
        // play with relative file names - put relative path as ../<parent dir 
        // name>/xx.jar 
        att.put(Attributes.Name.CLASS_PATH, ".." + File.separator
                + barJar.getParentFile().getName() + File.separator
                + barJar.getName());
        joutFoo = new JarOutputStream(new FileOutputStream(fooJar), man);
        joutFoo.putNextEntry(new JarEntry("foo/bar/execjartest/Foo.class"));
        joutFoo.write(getResource(resources, "hyts_Foo.ser"));
        joutFoo.close();
        // execute the JAR and read the result 
        assertTrue("Error executing JAR",
                execAndGetOutput(builder).startsWith( "FOOBAR"));
    } 
 
    /** 
     * tests case when Main-Class is not in the jar launched but in another jar 
     * referenced by Class-Path 
     *  
     * @throws Exception in case of troubles 
     */ 
    @TestTargetNew(