java - Unix Executable unable to execute in MAC OSX -


i have console application written in c++ (using boost libraries) , compiled in xcode , unix executable communicates daemon , specific task. when run console application command line arguments works perfectly. when call console application java code not executing. using processbuilder execute it. able execute system related command using same code. console application using depends on static library.

following spec's using: jdk - 1.7, mac osx - 10.7.5, xcode - 4.6.2, boost version - 1.53.0.

code using:

string str[] = {"/bin/sh", "-c" ,"/users/user/downloads/cppapplication_1"};            processbuilder builder = new processbuilder(str);        builder.directory(new file("/users/user/downloads/"));          final process process = builder.start();         process.waitfor();         inputstream = process.getinputstream();         inputstreamreader isr = new inputstreamreader(is);         bufferedreader br = new bufferedreader(isr);         string line;         while ((line = br.readline()) != null) {             system.out.println(line);         } 

its not throwing error. hanging.

any appreciated.

try execute system processes java processbuilder , process

definitely you.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -