// byte[] clientCode = null;
String clientCode = null;
Log.print(this,localStrings.getLocalString(
"enterprise.tools.deployment.main.deploytool.deploy_command",
"Deploy {0} on {1}", msg));
JarInstaller backend = this.getServerManager().getServerForName(serverName);
DeploymentSession deploymentSessionToUse = null;
if (deploymentSession == null) {
deploymentSessionToUse = this.getServerManager().createDeploymentSession(serverName);
} else {
deploymentSessionToUse = deploymentSession;
}
FileInputStream fis = new FileInputStream(appArchiveFile);
DataInputStream dis = new DataInputStream(fis);
byte[] jarData = new byte[(int) appArchiveFile.length()];
dis.readFully(jarData);
dis.close();
fis.close();
clientCode = backend.deployApplication(jarData, applicationName, deploymentSessionToUse);
Log.print(this, localStrings.getLocalString(
"enterprise.tools.deployment.main.clientcodeat",
"client code at {0}", new Object[] {clientCode}));
if (clientCode != null && clientCodeFile != null) {
writeClientJarToFile(clientCode, clientCodeFile);