This commit is contained in:
Imgaojp 2017-02-17 11:02:03 +08:00
parent aa8cb1b7c1
commit 579b62de22
3 changed files with 74 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class Cmd {
}
/**
* 打印帮助
* print usage
*
* @param args
*/

View File

@ -0,0 +1,44 @@
package com.gabongao.jvm;
import java.util.Arrays;
/**
*            + +
*         + +
*               
*               ++ + + +
*        +
*                +
*              
*                + +
*           
*             
*              + + + +
*                 Code is far away from bug with the animal protecting
*              +     神兽保佑,代码无bug
*             
*               +
*               + +
*                  
*                  
*           + + + +
*            
*            + + + +
* Created by Imgaojp on 2017/2/16.
*/
public class Jvm {
public static void main(String[] args) throws Exception {
Cmd cmd = new Cmd();
cmd.parseCmd(args);
if (cmd.isVersionFlag()) {
System.out.println("version 0.0.1");
} else if (cmd.isHelpFlag()) {
Cmd.printUsage(args);
} else {
startJvm(cmd);
}
}
private static void startJvm(Cmd cmd) {
System.out.printf("classpath: %s class: %s args:%s\n", cmd.getCpOption(), cmd.getClassName(), Arrays.asList(cmd.getArgs()).toString());
}
}

View File

@ -0,0 +1,29 @@
package com.gabongao.jvm.classpath;
/**
*            + +
*         + +
*               
*               ++ + + +
*        +
*                +
*              
*                + +
*           
*             
*              + + + +
*                 Code is far away from bug with the animal protecting
*              +     神兽保佑,代码无bug
*             
*               +
*               + +
*                  
*                  
*           + + + +
*            
*            + + + +
* Created by Imgaojp on 2017/2/16.
*/
public interface Entry {
// public
}