< prev index next >

test/tools/launcher/Jexec.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8175000
  27  * @summary test jexec

  28  * @build TestHelper
  29  * @run main Jexec
  30  */
  31 
  32 import java.io.File;
  33 import java.io.IOException;
  34 
  35 public class Jexec extends TestHelper {
  36     private final File testJar;
  37     private final File jexecCmd;
  38     private final String message = "Hello, do you read me ?";
  39 
  40     Jexec() throws IOException {
  41         jexecCmd = new File(JAVA_LIB, "jexec");
  42         if (!jexecCmd.exists() || !jexecCmd.canExecute()) {
  43             throw new Error("jexec: does not exist or not executable");
  44         }
  45 
  46         testJar = new File("test.jar");
  47         StringBuilder tsrc = new StringBuilder();




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8175000
  27  * @summary test jexec
  28  * @modules java.compiler
  29  * @build TestHelper
  30  * @run main Jexec
  31  */
  32 
  33 import java.io.File;
  34 import java.io.IOException;
  35 
  36 public class Jexec extends TestHelper {
  37     private final File testJar;
  38     private final File jexecCmd;
  39     private final String message = "Hello, do you read me ?";
  40 
  41     Jexec() throws IOException {
  42         jexecCmd = new File(JAVA_LIB, "jexec");
  43         if (!jexecCmd.exists() || !jexecCmd.canExecute()) {
  44             throw new Error("jexec: does not exist or not executable");
  45         }
  46 
  47         testJar = new File("test.jar");
  48         StringBuilder tsrc = new StringBuilder();


< prev index next >