package com.perforce.client; import java.util.*; import com.perforce.client.api.*; public class Main { public static void main( String[] args ) { try { System.loadLibrary( "p4japi" ); ClientUser ui = new ClientUser(); ClientApi client = new ClientApi(); String[] tempArgv = new String[ args.length - 2 ]; for ( int i = 0; i < tempArgv.length; i++ ) { tempArgv[i] = args[ i + 2 ]; } // // Setup Port and stuff here BEFORE INIT! // client.setUser( System.getProperty( "P4USER" ) ); client.setClient( System.getProperty( "P4CLIENT" ) ); client.setHost( System.getProperty( "P4PORT" ) ); client.setPassword( System.getProperty( "P4PASSWD" ) ); // Connect to server client.init(); // Run the command "argv[1] argv[2...]" client.setArgv( tempArgv ); client.run( args[1], ui ); // Close connection client.end(); } catch ( P4ClientException p4ce ) { p4ce.printStackTrace(); } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 7939 | Michael Bishop | /Users/mbishop/dev/public_1666/mbishop_mac/guest/michael_bishop/P4APIForJava/java/com/perforce/client/Main.java | ||
#3 | 7938 | Michael Bishop | /Users/mbishop/dev/public_1666/mbishop_mac/guest/michael_bishop/P4APIForJava/java/com/perforce/client/Main.java | ||
#2 | 7937 | Michael Bishop | /Users/mbishop/dev/public_1666/mbishop_mac/guest/michael_bishop/P4APIForJava/java/com/perforce/client/Main.java | ||
#1 | 430 | Michael Bishop |
Initial checkin. Seems to work. Not very much testing. Not very much documentation. Some more commenting needs to take place. But, it's there to experiment with. |