< prev index next >

test/javax/management/remote/mandatory/version/ImplVersionTest.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


  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 5046815
  27  * @summary Test that RMIServer.getVersion() reflects the JDK version when
  28  * the Java platform and the application is run with a security manager and the
  29  * test codebase has the java permission to read the "java.runtime.version"
  30  * system property.
  31  * @author Luis-Miguel Alventosa, Joel Feraud
  32  * @modules java.management
  33  * @run clean ImplVersionTest ImplVersionCommand
  34  * @run build ImplVersionTest ImplVersionCommand ImplVersionReader
  35  * @run main ImplVersionTest
  36  */
  37 
  38 import java.io.File;
  39 
  40 public class ImplVersionTest {
  41 
  42     public static void main(String[] args) {
  43         try {
  44             // Get OS name
  45             //
  46             String osName = System.getProperty("os.name");
  47             System.out.println("osName = " + osName);
  48             if ("Windows 98".equals(osName)) {
  49                 // Disable this test on Win98 due to parsing
  50                 // errors (bad handling of white spaces) when
  51                 // J2SE is installed under "Program Files".
  52                 //




  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 5046815
  27  * @summary Test that RMIServer.getVersion() reflects the JDK version when
  28  * the Java platform and the application is run with a security manager and the
  29  * test codebase has the java permission to read the "java.runtime.version"
  30  * system property.
  31  * @author Luis-Miguel Alventosa, Joel Feraud
  32  *
  33  * @run clean ImplVersionTest ImplVersionCommand
  34  * @run build ImplVersionTest ImplVersionCommand ImplVersionReader
  35  * @run main ImplVersionTest
  36  */
  37 
  38 import java.io.File;
  39 
  40 public class ImplVersionTest {
  41 
  42     public static void main(String[] args) {
  43         try {
  44             // Get OS name
  45             //
  46             String osName = System.getProperty("os.name");
  47             System.out.println("osName = " + osName);
  48             if ("Windows 98".equals(osName)) {
  49                 // Disable this test on Win98 due to parsing
  50                 // errors (bad handling of white spaces) when
  51                 // J2SE is installed under "Program Files".
  52                 //


< prev index next >