jar.setLocation(new Location(resourcesDir() + "Java" + File.separator + getJarName() + ".jar"));
jar.setDestFile(taskJar);
    protected void jarClasses() throws BuildException {        Jar jar = subtaskFactory.getJar();        //File taskJar =        //        new File(resourcesDir(), "Java" + File.separator + getJarName() + ".jar");        //jar.setJarfile(taskJar);        jar.setLocation(new Location(resourcesDir() + "Java" + File.separator + getJarName() + ".jar"));        if (hasClasses()) {            Enumeration en = classes.elements();            while (en.hasMoreElements()) {                jar.addFileset((FileSet) en.nextElement());            }        }        jar.execute();    }