Running a batch file from java-Collection of common programming errors

I just downloaded MCP to see how things work behind the scenes in Minecraft.

Inside MCP there are a bunch of batch files that you use to do things like: decompile, recompile, startclient, etc.

What I would like to be able to do is run these batch files from a basic java gui.

I’m good with the gui part but I havent got a clue how to run those batch files.

Here is an example of one of the batch files:

The file is at:

C:\MCP\startclient.bat

startclient contains the following:

@echo off

:try_python
set PYTHON=python
%PYTHON% --version >NUL 2>NUL
if errorlevel 1 goto try_python_mcp
goto foundit

:try_python_mcp
set PYTHON=runtime\bin\python\python_mcp
%PYTHON% --version >NUL 2>NUL
if errorlevel 1 (
    echo Unable to locate python.
    pause
    exit /b
)

:foundit
%PYTHON% runtime\startclient.py conf\mcp.cfg
pause

Can it be done?