I am trying to use Java exec to run my exec and am getting the results I am using in the program.
I have lines of code I
public static zero main (string [] argv throws exceptions {process p = runtime.gettime (). Exec ("phantomjs quebecPhantom.js"); BufferedReader = new BufferedReader (new InputStreamReader (p.getInputStream ()); String line = in.readLine (); System.out.println ("[x] transmitted '" + line + "' ');}
I hope to execute my PhantomJS script
And for the output of line
variable script
. But, my script does not execute (it should take more time and it should generate some screen shots which are not me ). And then, the line
variable has zero
value.
Do I have to disable my script Anything else should be considered for editing?
The problem with the above lines of code is that I want to execute the path of Phatcom and also execute the script in the command I want to execute, the line should be changed as follows,
process p = runtime.gettimetime (). Exec ("path to phantomjs" + "" + "path on script");
In my case it will be
Rkriya p = Rntaimkgetritaim (). Exec ("/ usr / bin / phantomjs / home / name /quebecPhantom.js");
No comments:
Post a Comment