Currently I am trying to create a desktop application using Swing's file chooser that will convert a specific type of file to another one, making use of cygwin. The relevant code part is :
String[] cmd = new String[]{"C:\\cygwin64\\bin\\mintty.exe", "/cygdrive/c/Users/orhun.vatansever/workspace/extchangegui/src/extchangegui/dene.sh"};
Process pr = Runtime.getRuntime().exec(cmd);
which is working fine, but since the content of my bashscript is like
cd "${0%/*}"
java -jar xyz.jar aegis.xyz
This means my code is working for one specific xyz file, what I want to do is select the file and run the command on that specific xyz file. I can get the filename with myfile.getName(), however I don't know how to use this data, where to put it in process builder. I see two solutions I think, one is setting one of the process builder parameters(don't know which one) to "java -jar xyz.jar "+file.getName()"" , other is changing the script's content upon clicking the open button of file chooser(which doesn't make sense I think).