Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class ExecTest {
- public static void main(String[] args) throws IOException {
- Process result = Runtime.getRuntime().exec("explorer /e=\"search-ms:query=something.jpg\"");
- BufferedReader output = new BufferedReader(new InputStreamReader(result.getInputStream()));
- StringBuffer outputSB = new StringBuffer(40000);
- String s = null;
- while ((s = output.readLine()) != null) {
- outputSB.append(s + "\n");
- System.out.println(s);
- }
- String resultString = outputSB.toString();
- System.out.println( resultString );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement