public void run ( List < String > args ) throws ProcessHandlerException , AppEngineJavaComponentsNotInstalledException , InvalidJavaSdkException , IOException { sdk . validateAppEngineJavaComponents ( ) ; sdk . validateJdk ( ) ; // App Engine Java Sdk requires this system property to be set. // TODO: perhaps we should send this in directly to the command instead of changing the global // state here (see DevAppServerRunner) System . setProperty ( "appengine.sdk.root" , sdk . getAppEngineSdkForJavaPath ( ) . toString ( ) ) ; List < String > command = new ArrayList <> ( ) ; command . add ( sdk . getJavaExecutablePath ( ) . toString ( ) ) ; command . add ( "-cp" ) ; command . add ( sdk . getAppEngineToolsJar ( ) . toString ( ) ) ; command . add ( "com.google.appengine.tools.admin.AppCfg" ) ; command . addAll ( args ) ; logger . info ( "submitting command: " + Joiner . on ( " " ) . join ( command ) ) ; ProcessBuilder processBuilder = processBuilderFactory . newProcessBuilder ( ) ; processBuilder . command ( command ) ; Process process = processBuilder . start ( ) ; processHandler . handleProcess ( process ) ; }
Executes an App Engine SDK CLI command .