Package net.alteiar.campaign.player.tools

Examples of net.alteiar.campaign.player.tools.PropertieBase


  public PluginInfo(String directory) throws IOException {
    this(new File(directory));
  }

  public PluginInfo(File dir) throws IOException {
    PropertieBase propertie = new PropertieBase(dir.getCanonicalPath()
        + "/plugin.prop");
    propertie.load();

    // LOAD GENERAL INFO ABOUT PLUGIN
    name = propertie.getValue(PROP_PLUGIN_NAME);
    corePlugin = propertie.getValue(PROP_CLASS_CORE_PLUGIN_NAME);
    documentPlugin = propertie.getValue(PROP_CLASS_DOCUMENT_PLUGIN_NAME);

    // LOAD MAIN JAR
    String jarFile = propertie.getValue(PROP_JAR_NAME);
    jar = new File(dir, jarFile.trim());

    if (!jar.exists()) {
      throw new FileNotFoundException(
          "Impossible de trouver le fichier jar"
              + jar.getCanonicalPath() + ", du plugin " + name);
    }

    // LOAD JAR DEPENDENCIES
    String depsString = propertie.getValue(PROP_DEPENDENCIES);

    String[] deps = depsString.split(DEPENDENCIES_SEPERATOR);
    dependencies = new ArrayList<>();
    for (String dep : deps) {
      File fileDep = new File(dir, dep.trim());
View Full Code Here

TOP

Related Classes of net.alteiar.campaign.player.tools.PropertieBase

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.