I am working on Windows and I have downloaded cygwin. I want to launch the cygwin terminal from a java program but I can't find the command so I can launch the terminal and then write line command into it.
When I go to the cygwin Terminal icon parameters, I can see this :
target: C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -
But when I use this to launch the terminal on my program:
ProcessBuilder pb = new ProcessBuilder("C:\\cygwin64\\bin\\mintty.exe", "cd Documents");
I have a shell that opens wit this :
cd Documents: No such file or directory
I think that my problem is that I launch the wrong cygwin terminal but I can't find where is the right Cygwin terminal.
Does anyone knows where is the right cygwin terminal so I can write line commands in my java program and the temrinal will understand them ?