@@ -0,0 +1,1650 @@
+package util;%0A%0Aimport sun.reflect.generics.reflectiveObjects.NotImplementedException;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0A%0A/**%0A * Created by nwilson on 2/23/15.%0A */%0A// TODO fix this up if we want any sort of portability%0Apublic abstract class Os %7B%0A    public static final int INTERRUPTED_STATUS = Integer.MIN_VALUE + 2;%0A    public static final int IO_FAILURE_STATUS  = Integer.MIN_VALUE + 3;%0A%0A    public static Os current = GetCurrent();%0A%0A    // Inspect the runtime environment and set up os interface properly%0A    private static Os GetCurrent() %7B%0A        return new UnixOs(); // TODO%0A    %7D%0A%0A    /**%0A     * Returns exit statis of cmd%0A     * @param cmdAndArgs: The cmd and arguments as would be typed into a shell%0A     * @return%0A     */%0A    public abstract int Exec(String cmdAndArgs);%0A%0A    private static class UnixOs extends Os%0A    %7B%0A        public UnixOs() %7B %7D%0A%0A        @Override%0A        public int Exec(String cmdAndArgs) %7B%0A            try %7B%0A                ProcessBuilder pb = new ProcessBuilder(cmdAndArgs);%0A                pb.redirectError(ProcessBuilder.Redirect.INHERIT);%0A                pb.redirectOutput(ProcessBuilder.Redirect.INHERIT);%0A                return pb.start().waitFor();%0A            %7D catch (IOException ex) %7B%0A                return IO_FAILURE_STATUS;%0A            %7D catch (InterruptedException ex) %7B%0A                return INTERRUPTED_STATUS;%0A            %7D%0A        %7D%0A    %7D%0A%0A    // TODO, etc. etc.%0A    private static class WindowsOS extends Os %7B%0A%0A        @Override%0A        public int Exec(String cmdAndArgs) %7B%0A            throw new NotImplementedException();%0A        %7D%0A    %7D%0A%7D%0A%0A

Add OS layer