/**
     * Get the all the filenames with absolute path
     * All the files fullpath will be store in vector
     * @return the path name
     */
    public static void getFilesRecursive(File dir,Vector v)
    {
        if(dir.isDirectory())
        {
            String path = dir.getAbsolutePath();
            String sub[] = dir.list();
            for(int i = 0;i<sub.length;i++)
            {
                File f = new File(path + File.separator + sub[i]);
                getFilesRecursive(f,v);
            }
        }
        else
        {            String tmp = dir.getAbsolutePath();
            v.add(tmp);
            //System.out.println(tmp);
        }    }
Vector v = new Vector();
out.println(getFilesRecursive("yourpath",v).size());