method 1:
Byte [] env = new byte [1000]; try {process objprcess = objruntime.exec ("cmd / c echo% java_home); inputstream in = objprcess.getinputStream (); in.read (ENV); string ls_env = New string (env) .trim (); system.out.println ("ls_env:" ls_env);} catch (exception e) {E.PrintStackTrace ();}
Method 2:
Public class getsysproperties {public static void main (string [] argv) {system.getproperties (). list (system.out);}}