Java Runtime OR Processbuilder OR Other -


i'd know best alternative running command line executables java. target platforms commands windows 7(+) , unix/linux.

i have class uses runtime.exec() along enhancements javaworld streamgobbler article. works 90% of time on both windows , unix. other 10% of time need extend class , fiddle putting cmd.exe of /bin/sh in front of command. i've had fiddle between using single string has command , arguments splitting command , args string[] array.

my latest new error/exception "java.lang.illegalargumentexception: executable name has embedded quote, split arguments." current runtime.exec() class works fine in eclipse running java application, once build , run command prompt, fails above exception.

so i'm reading should using processbuilder command line executables os platform.

my question is, best alternative? runtime.exec(), processbuilder, or other option? there 1 option service both windows , unix/linux? if not, 1 works best windows? 1 works best unix/linux?

tia, adym

not sure how give bohemian credit, used processbuilder...solution @ :

java - processbuilder command arguments spaces , double-quotes fails


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -