My problem regards to compiling c++ file within java. I have tried execution of c#, it is fine. This extract code for compiling c#
ProcessBuilder launcher = new ProcessBuilder("gmcs","HelloWorld.cs");`
However, my code for c++
ProcessBuilder launcher =new ProcessBuilder("g++", "HelloWorld.cpp -o HelloWorld");
returns error=2, No such file or directory
To indicate path I used
launcher.directory(new File(path))
in both of cases