equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
75 } |
75 } |
76 |
76 |
77 InputStream execute(String cmd, Object ... args) |
77 InputStream execute(String cmd, Object ... args) |
78 throws AgentLoadException, IOException |
78 throws AgentLoadException, IOException |
79 { |
79 { |
80 assert args.length <= 3; // includes null |
80 assert args.length <= 4; // includes null |
81 |
81 |
82 // create a pipe using a random name |
82 // create a pipe using a random name |
83 Random rnd = new Random(); |
83 Random rnd = new Random(); |
84 int r = rnd.nextInt(); |
84 int r = rnd.nextInt(); |
85 String pipeprefix = "\\\\.\\pipe\\javatool"; |
85 String pipeprefix = "\\\\.\\pipe\\javatool"; |