java - Executing a jar with arguments, but it's not accepting argument whatever I give in ProcessBuilder method -


i executing .jar arguments have written below, it's executing jar , waiting arguments. i give arguments, it's not accepting, same method working fine other .jar execution many arguments i've tried. can problem?

here code :-

public static void main(string[] args) throws ioexception {     // todo auto-generated method stub      //bufferedreader br = null;     system.out.println("starting");     processbuilder pb = new processbuilder("c:/java/jdk1.6.0_35/bin/java","-jar","c:/tcserver/tcclient/lib/tbrowser.jar","browser.1");     try{         process p = pb.start();         outputstream stdin = p.getoutputstream ();         inputstream stderr = p.geterrorstream ();         inputstream stdout = p.getinputstream ();           inputstream = p.getinputstream();         inputstreamreader isr = new inputstreamreader(is);         bufferedreader buff = new bufferedreader (isr);         string line;         while((line = buff.readline()) != null)             system.out.println(line);         }         catch (exception e) {             // todo: handle exception             system.out.println(e);         }     } } 


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -