jdk/test/tools/pack200/Utils.java
changeset 12544 5768f2e096de
parent 9734 b33a24d77590
child 16013 3569e84e7429
equal deleted inserted replaced
12543:b77bc2f404ba 12544:5768f2e096de
     1 /*
     1 /*
     2  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2007, 2012, 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.
     7  * published by the Free Software Foundation.
   127     }
   127     }
   128     static void doCompareVerify(File reference, File specimen) throws IOException {
   128     static void doCompareVerify(File reference, File specimen) throws IOException {
   129         init();
   129         init();
   130         List<String> cmds = new ArrayList<String>();
   130         List<String> cmds = new ArrayList<String>();
   131         cmds.add(getJavaCmd());
   131         cmds.add(getJavaCmd());
   132         cmds.add("-jar");
   132         cmds.add("-cp");
   133         cmds.add(VerifierJar.getName());
   133         cmds.add(Utils.locateJar("tools.jar") +
       
   134                 System.getProperty("path.separator") + VerifierJar.getName());
       
   135         cmds.add("sun.tools.pack.verify.Main");
   134         cmds.add(reference.getAbsolutePath());
   136         cmds.add(reference.getAbsolutePath());
   135         cmds.add(specimen.getAbsolutePath());
   137         cmds.add(specimen.getAbsolutePath());
   136         cmds.add("-O");
   138         cmds.add("-O");
   137         runExec(cmds);
   139         runExec(cmds);
   138     }
   140     }
   140     static void doCompareBitWise(File reference, File specimen)
   142     static void doCompareBitWise(File reference, File specimen)
   141             throws IOException {
   143             throws IOException {
   142         init();
   144         init();
   143         List<String> cmds = new ArrayList<String>();
   145         List<String> cmds = new ArrayList<String>();
   144         cmds.add(getJavaCmd());
   146         cmds.add(getJavaCmd());
   145         cmds.add("-jar");
   147         cmds.add("-cp");
   146         cmds.add(VerifierJar.getName());
   148         cmds.add(Utils.locateJar("tools.jar")
       
   149                 + System.getProperty("path.separator") + VerifierJar.getName());
       
   150         cmds.add("sun.tools.pack.verify.Main");
   147         cmds.add(reference.getName());
   151         cmds.add(reference.getName());
   148         cmds.add(specimen.getName());
   152         cmds.add(specimen.getName());
   149         cmds.add("-O");
   153         cmds.add("-O");
   150         cmds.add("-b");
   154         cmds.add("-b");
   151         runExec(cmds);
   155         runExec(cmds);