--- Paul Perevalov <[EMAIL PROTECTED]> wrote: > I do all my development on windows, for unix "con" should be replaced on > "/dev/stdin". You can hardcode this :) or just add a little code snippet > to make this target platform independent (I didn't test it on unix, so > probably you have to test it a little bit): > > //get os name > var os = project.getProperty("os.name"); > var console; > > //select appropriate input > if(os.charAt(0) == 'W' || os.charAt(0) == 'w'){ > console = "con"; > }else{ > console = "/dev/stdin"; > } > > //get standart input stream > var stdin = new BufferedReader(new InputStreamReader(new > FileInputStream(console))); > > Just add this code to the target and remove duplicate line where new > BufferedReader is created.
If you're running Ant 1.4, you can use the <condition> task to set a *nix versus Win* property -- eg: <condition property="console" value="/dev/stdin"> <os family="unix"/> </condition> <condition property="console" value="con"> <os family="windows"/> </condition> Diane ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>