com.hibegin.common.util.ParseArgsUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simplewebserver Show documentation
Show all versions of simplewebserver Show documentation
Simple, flexible, less dependent, more extended. Less memory footprint, can quickly build Web project.
Can quickly run embedded, Android devices
package com.hibegin.common.util;
public class ParseArgsUtil {
public static boolean justTips(String[] args, String processName, String version) {
if (args.length > 0) {
switch (args[0]) {
case "-v":
case "--version":
System.out.println(processName + " version: " + version);
return true;
case "--properties":
System.getProperties().forEach((key, value) -> System.out.format("%s=%s%n", key, value));
return true;
case "--env":
System.getenv().forEach((key, value) -> System.out.format("%s=%s%n", key, value));
return true;
}
}
return false;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy