 <p>If you look at the contents of <code>Cygwin.bat</code>, you'll see it calls the <code>bash.exe</code> binary:</p> <pre><code>@echo off C: chdir C:\cygwin\bin bash --login -i </code></pre> <p>Command binaries usually have a <code>help</code> argument. In this case, bash most certainly does:</p> <pre><code>bash --help GNU bash, version 3.2.49(23)-release-(i686-pc-cygwin) Usage: bash [GNU long option] [option] ... bash [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --protected --rcfile --restricted --verbose --version --wordexp Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option Type `bash -c "help set"' for more information about shell options. Type `bash -c help' for more information about shell builtin commands. Use the `bashbug' command to report bugs. </code></pre> <p>Now that we know what options it takes, your Java application can call bash directly:</p> <pre><code>String commandString = "help"; Runtime rt = Runtime.getRuntime(); Process pr = rt.exec("C:\\cygwin\\bin\\bash -c " + commandString); </code></pre> <p>Remember to replace <code>commandString</code> with the value from your Swing component.</p>