String passWord;
String fromPath;
String toPath;
String args0 = null;
String key_store;
RemoteRegistry remoteRegistry;
if (args.length > 0) {
args0 = args[0];
}
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
System.out.println("Path to registry key_store file:");
key_store = br.readLine();
System.out.println("Registry URL :");
registryURL = br.readLine();
System.out.println("User Name :");
userName = br.readLine();
if ("".equals(userName)) {
userName = null;
}
System.out.println("Password :");
passWord = br.readLine();
if ("".equals(passWord)) {
passWord = null;
}
System.out.println("From Path :");
fromPath = br.readLine();
if ("".equals(fromPath)) {
throw new Exception(
" From path can not be null , you have to provide the local file system location!!");
}
System.out.println("To Path :");
toPath = br.readLine();
System.setProperty("javax.net.ssl.trustStore", key_store);
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
if (userName == null) {
remoteRegistry = new RemoteRegistry(new URL(registryURL));
} else {
remoteRegistry = new RemoteRegistry(new URL(registryURL), userName,
passWord);
}
if (args0 == null) {