Java 中如何读取环境变量
//引用自:http://topic.csdn.net/t/20020318/12/583112.html
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class enviormentPath {
public static void SYS_CmdExec(String cmdline)
{
try
{
String line;
Process p = Runtime.getRuntime().exec(cmdline);
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
while((line = input.readLine())!= null)
{
System.out.println(line);
}
input.close();
}catch(Exception err)
{
err.printStackTrace();
}
}
public static void main(String[] args) {
//enviormentPath path = new enviormentPath();
enviormentPath.SYS_CmdExec("cmd.exe /C set");
}
}
ε.Ε.epsilon ζ.Ζ.zeta η.Η.eta θ.Θ.theta
ι.Ι.iota κ.Κ.kappa λ.Λ.lambda μ.Μ.mu
ν.Ν.nu ξ.Ξ.xi ο.Ο.omicron π.Π.pi
ρ.Ρ.rho σ.Σ.sigma τ.Τ.tau υ.Υ.upsilon