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
Post a Comment