import java.io.*;
import java.util.*;
import com.perforce.api.*;
public class AddAFile {
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();
/* Create a new change with the environment. The change will not exist on
* the server, until the commit() method is called.
*/
Change chng = new Change(env);
try {
chng.setDescription("Some Test");
chng.commit();
FileEntry fent = FileEntry.openForAdd(env, "d:\\pubdepot\\guest\\david_markley\\p4package\\build2.xml", chng);
chng.resolve(true);
} catch (Exception ex) {
ex.printStackTrace();
}
Utils.cleanUp();
}
}