1 package com.highstreet.technologies.helpserver.data;
3 import java.net.Inet4Address;
4 import java.net.UnknownHostException;
7 public class Environment {
9 public static String getVar(String v)
11 if(v.equals("$HOSTNAME"))
13 return Inet4Address.getLocalHost().getHostName();
14 } catch (UnknownHostException e) {
17 Map<String, String> env = System.getenv();
18 for (String envName : env.keySet()) {
19 if(envName!=null && envName.equals(v))
20 return env.get(envName);