I'm using java on Windows, and want to call a Linux command so I'm trying to open git bash and paste some commands. I'm able to open git bash but can't paste anything.
This opens git bash fine:
String [] args = new String[] {"C:\\Progam Files\\Git\\git-bash.exe"}
Process proc = new ProcessBuilder(args).start();
When I do this, git bash opens but closes right away:
String [] args = new String[] {"C:\\Progam Files\\Git\\git-bash.exe", "-c", "cd c:"}
Process proc = new ProcessBuilder(args).start();