langtools/test/tools/javac/EarlyAssertWrapper.java
changeset 27579 d1a63c99cdd5
parent 5520 86e4b9a9da40
equal deleted inserted replaced
27578:d61af14a5cf7 27579:d1a63c99cdd5
     1 /*
     1 /*
     2  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 2014, 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.
    35     }
    35     }
    36 
    36 
    37     void run() throws Exception {
    37     void run() throws Exception {
    38         List<String> cmd = new ArrayList<String>();
    38         List<String> cmd = new ArrayList<String>();
    39         File java_home = new File(System.getProperty("java.home"));
    39         File java_home = new File(System.getProperty("java.home"));
    40         if (java_home.getName().equals("jre"))
       
    41             java_home = java_home.getParentFile();
       
    42         cmd.add(new File(new File(java_home, "bin"), "java").getPath());
    40         cmd.add(new File(new File(java_home, "bin"), "java").getPath());
    43 
       
    44         // ensure we run with the same bootclasspath as this test,
       
    45         // in case this test is being run with -Xbootclasspath
       
    46         cmd.add("-Xbootclasspath:" + System.getProperty("sun.boot.class.path"));
       
    47 
    41 
    48         // propogate classpath
    42         // propogate classpath
    49         cmd.add("-classpath");
    43         cmd.add("-classpath");
    50         cmd.add(System.getProperty("java.class.path"));
    44         cmd.add(System.getProperty("java.class.path"));
    51 
    45