diff --git a/kbox.kibe/src/main/java/org/aksw/kbox/kibe/KBox.java b/kbox.kibe/src/main/java/org/aksw/kbox/kibe/KBox.java index a949595..ae2cf75 100644 --- a/kbox.kibe/src/main/java/org/aksw/kbox/kibe/KBox.java +++ b/kbox.kibe/src/main/java/org/aksw/kbox/kibe/KBox.java @@ -144,7 +144,8 @@ public static void main(String[] args) throws Exception { removeKNS(new URL(knsURL)); logger.info("KNS removed."); } else if (commands.containsKey(RESOURCE_DIR_COMMAND)) { - String resourceDir = commands.get(RESOURCE_DIR_COMMAND); + String resourceDir = commands.get(RESOURCE_DIR_COMMAND); + logger.info(resourceDir); if(resourceDir != null) { try { setResourceFolder(resourceDir); @@ -227,14 +228,15 @@ public static void removeKNS(URL url) { /** * Command line parser. + * * @param args a set o arguments received by command line * @return a Map containing the parsed arguments */ public static Map parse(String[] args) { Map map = new HashMap(); for(int i = 0; i < args.length ; i++) { - if(args[i].contains("-")) { // is a command - if(i+1 < args.length && !args[i+1].contains("-")) { + if(args[i].startsWith("-")) { // is a command + if(i+1 < args.length && !args[i+1].startsWith("-")) { map.put(args[i], args[i+1]); } else { map.put(args[i], null);