I am trying to output captured packet information to a .txt file. Running the below code in a terminal works (removing the " of course). However java doesn't seem to like ">". I get the following error message; tshark: A default capture filter was specified both with "-f" and with additional command-line arguments.
Process p1 = Runtime.getRuntime().exec(new String[]{"tshark","-f","tcp src port 80","-i","en0","-l",">","raw.txt"});
However if i use "-w" instead of ">" it outputs the binary data just fine.