java - Processbuilder unable to find files while running C++ executable -


i'm trying run c++ executable java 1.8 using processbuilder in linux. executable takes 2 filenames parameters read further processing. java code follows:

        public static void main(string args[]){          string rootdir = "/home/rtuk/qw_simp/";         processbuilder process = new processbuilder(rootdir + "qw_simple", "photo1.jpg","photo2.jpg");          process.directory(new file(rootdir));         process p = process.start();         int err=p.waitfor();         inputstream = p.geterrorstream();         inputstreamreader isr = new inputstreamreader(is);         bufferedreader br = new bufferedreader(isr);         string line;          while ((line = br.readline()) != null) {             system.out.println(line);         }     } 

however, c++ executable not able find files passed parameters , errors specifying files not found. problem here? tried explicitly setting absolute path both arguments, didnt work.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -