import java.io.*;
import java.util.*;
import com.perforce.api.*;
public class GetLabel {
public static void main(String[] argv) {
/* Please see the Common.java file to see how the environment is being
* set up. This is important, but it is common to all the examples.
*/
Env env = Common.setup();
Label lbl;
// You should use ArrayList for better performce; these are old exmaples
Vector files;
int i=0;
try {
lbl = new Label("MY_FAVORITE_LABEL");
files=lbl.getFiles();
Enumeration en = files.elements();
while(en.hasMoreElements()){
System.out.println(en.nextElement());
System.out.println(i);
i+=1;
}
} catch (Exception ex) {
System.out.println(ex.getMessage());
ex.printStackTrace();
}
Utils.cleanUp();
}
}