Package com.esotericsoftware.jsonbeans

Examples of com.esotericsoftware.jsonbeans.Json


  public static boolean isMacOSX = false;
  public static boolean isLinux = false;
 
  public static void main(String[] args) throws IOException{
    arguments = new Arguments(args);
    Json json = new Json();
    json.setOutputType(OutputType.json);
   
    determineOS();
   
    System.out.println("Jar Wrapper Version " + version);
    System.out.println("*********");
   
    /*
    BundlerConfig config = new BundlerConfig();
    config.defaults();
    String configFile = json.prettyPrint(config);
    saveConfigFile(configFile);
    */
   
    System.out.print("Loading config file ... ");
   
    File configFile;
   
    if(arguments.has("-config")){
      configFile = new File(arguments.get("-config"));
    }
    else {
      configFile = new File("config/config.json");
    }
   
    if(!configFile.exists()){
      System.out.println("Can't find the supplied config file, or the default file.");
      System.exit(0);
    }
    else {
      String configContent = readFile(configFile);
      config = json.fromJson(BundlerConfig.class, configContent);
    }
   
    if(config == null){
      System.out.println("Something went wrong while loading the config file. Abort.");
      System.exit(0);
View Full Code Here

TOP

Related Classes of com.esotericsoftware.jsonbeans.Json

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.