--- old/src/java.base/share/classes/sun/launcher/resources/launcher.properties Mon Dec 15 13:39:37 2014 +++ new/src/java.base/share/classes/sun/launcher/resources/launcher.properties Mon Dec 15 13:39:36 2014 @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -46,11 +46,7 @@ \ -verbose:[class|gc|jni]\n\ \ enable verbose output\n\ \ -version print product version and exit\n\ -\ -version:\n\ -\ require the specified version to run\n\ \ -showversion print product version and continue\n\ -\ -jre-restrict-search | -no-jre-restrict-search\n\ -\ include/exclude user private JREs in the version search\n\ \ -? -help print this help message\n\ \ -X print help on non-standard options\n\ \ -ea[:...|:]\n\ --- old/test/tools/launcher/MultipleJRE.sh Mon Dec 15 13:39:38 2014 +++ new/test/tools/launcher/MultipleJRE.sh Mon Dec 15 13:39:38 2014 @@ -1,6 +1,6 @@ #!/bin/sh # @test MultipleJRE.sh -# @bug 4811102 4953711 4955505 4956301 4991229 4998210 5018605 6387069 6733959 +# @bug 4811102 4953711 4955505 4956301 4991229 4998210 5018605 6387069 6733959 8058407 8067421 # @build PrintVersion # @build UglyPrintVersion # @build ZipMeUp @@ -7,9 +7,8 @@ # @run shell MultipleJRE.sh # @summary Verify Multiple JRE version support has been removed # @author Joseph E. Kowalski - # -# Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -91,6 +90,36 @@ } # +# Shell routine to ensure help page does not include mjre options +# +TestHelp() { + mess="`$JAVA -help 2>&1`" + # make sure it worked + if [ $? -ne 0 ]; then + echo "java -help failed ????" + exit 1 + fi + + echo $mess | grep '\-version:' > /dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "help message contains obsolete option version:" + exit 1 + fi + + echo $mess | grep '\-jre-restrict-search' > /dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "help message contains obsolete option jre-restrict-search" + exit 1 + fi + + echo $mess | grep '\-no-jre-restrict-search' > /dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "help message contains obsolete option no-jre-restrict-search" + exit 1 + fi +} + +# # Just as the name says. We sprinkle these in the appropriate location # in the test file system and they just say who they are pretending to be. # @@ -457,7 +486,8 @@ LaunchVM "" "${RELEASE}" # Going to silently ignore JRE-Version setting in jar file manifest #LaunchVM "" "warning: The jarfile JRE-Version" - -exit 0 + # Verify help does not contain obsolete options + TestHelp +exit 0 --- old/test/tools/launcher/PrintVersion.java Mon Dec 15 13:39:40 2014 +++ new/test/tools/launcher/PrintVersion.java Mon Dec 15 13:39:39 2014 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,12 +27,9 @@ * This stub simply prints out the java version string. It is used * by MultipleJRE.sh. */ -import sun.misc.Version; public class PrintVersion { - - public static void main(String argv[]) { - Version.print(); - } - + public static void main(String argv[]) { + System.out.println(System.getProperty("java.version")); + } } --- old/test/tools/launcher/UglyPrintVersion.java Mon Dec 15 13:39:41 2014 +++ new/test/tools/launcher/UglyPrintVersion.java Mon Dec 15 13:39:41 2014 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,12 +30,8 @@ */ package reallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongpackagename; -import sun.misc.Version; - public class UglyPrintVersion { - - public static void main(String argv[]) { - Version.print(); - } - + public static void main(String argv[]) { + System.out.println(System.getProperty("java.version")); + } }