package org.enhydra.tool;
import org.enhydra.tool.common.PathHandle;
import java.io.File;
import java.util.Properties;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author dacha&strale
* @version 1.0
*/
public class InitEnhydraRoot {
public InitEnhydraRoot() {
}
public static void main(String args[]) {
String enhydraRoot = args[0];
PathHandle path = null;
Properties props = null;
String message = null;
path = PathHandle.createPathHandle(enhydraRoot);
if (path.isDirectory() && ToolBoxInfo.isEnhydraRoot(path.getPath())) {
try {
// props = ToolBoxInfo.loadProperties();
props=new Properties();
String projectDir=path.getPath()+File.separator+"myProjects";
props.setProperty("webapp.root", projectDir);
props.setProperty("enapp.root", projectDir);
props.setProperty(ToolBoxInfo.ENHYDRA_ROOT, path.getPath());
ToolBoxInfo.storeProperties(props);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
|