You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by fu...@apache.org on 2005/02/03 22:28:31 UTC

svn commit: r151234 [1/3] - in incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: harness/FileCompare.java harness/RunList.java harness/RunTest.java harness/j9_22.java master/j9_22/ master/j9_22/distinct.out master/j9_22/groupBy.out tests/lang/copyfiles.ant tests/lang/procedure_app.properties

Author: fuzzylogic
Date: Thu Feb  3 13:28:29 2005
New Revision: 151234

URL: http://svn.apache.org/viewcvs?view=rev&rev=151234
Log:
Enable testing on WCTME 5.7 JVM (aka J9 2.2)

Committed for Myrna Van Lunteran <my...@golux.com>

Added:
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_22.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/distinct.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/groupBy.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure_app.properties
Modified:
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java?view=diff&r1=151233&r2=151234
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/FileCompare.java Thu Feb  3 13:28:29 2005
@@ -371,7 +371,8 @@
 	// first search jvmName (to support unnamed/non-IBM or Sun JVMs)
 	// if vendor == IBM, search ibm+rev then jdk+rev, decrementing rev by one until rev=13,
 	// in each dir, search framework and driver version if applicable.
-	// BUT, if it's j9, search j9_foundation then j9_13 if j9_foundation, or j9_13 for j9_13, then 	       // the normal ibm13 search pattern: ibm13 then jdk13.
+	// BUT, if it's j9, first j9_foundation, then search j9_22 for 22, otherwise, j9_13 then
+	// the normal ibm13 search pattern: ibm13 then jdk13.
 
 	String newprefix;
 	if (jvmName.startsWith("j9") || (serverJvm != null && serverJvm.startsWith("j9")))
@@ -382,7 +383,22 @@
 		if (master == null && searchDriverVersion) searchDriverVersion(newprefix);
 		if (master == null) getmaster(newprefix);
             }
-            newprefix = prefix + "j9_13" + '/';
+	    else
+            {
+                newprefix = prefix + jvmName + '/';
+                if ((!jvmName.equals("j9_13")) && (iminor  > 1))
+                {
+                    for (int i = iminor; i > 1; i--)
+                    {
+                        if (master == null) 
+                        {
+                            newprefix = prefix + "j9_2" + i + '/'; 
+                            getmaster(newprefix);
+                        }
+                    }
+                }
+                if (master == null) newprefix = prefix + "j9_13" + '/';
+            }
 	    if (master == null && searchDriverVersion) searchDriverVersion(newprefix);
 	    if (master == null) getmaster(newprefix);
 	    

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java?view=diff&r1=151233&r2=151234
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunList.java Thu Feb  3 13:28:29 2005
@@ -108,7 +108,8 @@
 	static String topreportdir; // where to place the .pass and .fail files
 	static String canondir; // location of masters (default is master)
 	static String bootcp; // for j9 bootclasspath
-	static String serverJvm; // for starting another jvm for networkserver, j9 only for now.
+	static String serverJvm; // for starting another jvm for networkserver, j9 default.
+	static String serverJvmName; // for starting another jvm for networkserver, j9_22 default.
     static File outDir; // test out dir
     static File outFile; // suite output file
     static File runDir; // location of suite.runall (list of tests)
@@ -148,7 +149,7 @@
         //System.out.println("RunList topSuiteName= " + topSuiteName);
         this.topParentSuite = topParentSuite;
         //System.out.println("topParentSuite= " + topParentSuite);
-        
+
         // Run the suites
         runSuites(suitesToRun);
     }
@@ -163,7 +164,7 @@
         userdir = System.getProperty("user.dir");
         //System.out.println("Number of suites in list = " + suitesToRun.size());
         Properties p = null;
-        
+
         // First get the top level suiteProperties since some
         // special properties might need to be used by all sub-suites
         setTopSuiteProperties();
@@ -171,7 +172,7 @@
         Properties topParentSuiteProps = 
             locateSuiteProperties(topParentSuite, suiteProperties, true, true);
         setSuiteProperties(topParentSuiteProps, topParentSuite, suiteProperties, true, true);
-            
+
         // Now handle the list of child suites under this parent
         for (int i = 0; i < suitesToRun.size(); i++)
         {
@@ -195,11 +196,11 @@
                 subProps = topParentSuiteProps;
             }
             setSuiteProperties(subProps, subSuite, topParentSuiteProps, true, false);
-            
+
             // Now handle the child suite of this subSuite
             suiteName = fullsuiteName.substring(fullsuiteName.lastIndexOf(":")+1);
             //System.out.println("child suiteName: " + suiteName);
-                
+
             p = locateSuiteProperties(suiteName, subProps, false, false);
             setSuiteProperties(p, suiteName, subProps, false, false);
 
@@ -236,7 +237,7 @@
                 }
                 else
                     pwOut.println("Framework: No special framework.");
-                
+
                 // Create the file to list the suites that get skipped
 	            File f = new File(outDir, topSuiteName);
 	            File skipFile = new File(f, topSuiteName+".skip");
@@ -254,7 +255,7 @@
 
                 System.out.println("Now run the suite's tests");
                 //System.out.println("shutdownurl: " + shutdownurl);
-                
+
                 if (skip) // Skip a suite under certain environments
 				{
 				    addToSkipFile(topSuiteName+":"+fullsuiteName, ps);
@@ -296,11 +297,11 @@
                             //System.out.println("renamed: " + renamed);
                         }
                     }
-                    
+
                     // Run the tests for this suite
                     runTests(p, fullsuiteName);
                 }
-                
+
                 String endTime = CurrentTime.getTime();
                 pwOut.println("**** End SubSuite: " + fullsuiteName +
                     " jdk" + javaVersion +
@@ -355,14 +356,14 @@
             jvmProps.addElement("verbose=true");
         if ( (reportstderr != null) && (reportstderr.length()>0) )
             jvmProps.addElement("reportstderr=" + reportstderr);
-        
+
         if ( (jvmflags != null) && (jvmflags.length()>0) )
         {
             // We want to pass this down to RunTest so it will
             // run an individual test with jvmflags like -nojit
             jvmProps.addElement("jvmflags=" + '"' + jvmflags + '"');
         }
-        
+
         if ( (timeout != null) && (timeout.length()>0) )
         {
             if (useprocess)
@@ -407,6 +408,8 @@
             jvmProps.addElement("bootcp=" + bootcp);
         if ( (serverJvm != null) && (serverJvm.length()>0) )
             jvmProps.addElement("serverJvm=" + serverJvm);
+        if ( (serverJvmName != null) && (serverJvmName.length()>0) )
+            jvmProps.addElement("serverJvmName=" + serverJvmName);
         if ( useprocess == false )
             jvmProps.addElement("useprocess=false");
         if ( skipsed.equals("true") )
@@ -429,7 +432,7 @@
             jvmProps.addElement("testSpecialProps=" + otherSpecialProps);
 
         jvmProps.addElement("suitename=" + suite);
-        
+
         if ( (topSuiteName != null) && (topSuiteName.length()>0) )
             jvmProps.addElement("topsuitename=" + topSuiteName);
 
@@ -468,13 +471,13 @@
             verboseSb.append(str + " ");
             //if (verbose) 
                 //System.out.println("Execute command: " + verboseSb.toString());
-            
+
 	        String uc = System.getProperties().getProperty("useCommonDB");
 		    if (uc == null) uc = "false";
             if ( useprocess == true && uc.equals("true")==false)
             {
                 System.out.println("Execute command: " + verboseSb.toString());
-                
+
                 // Now execute the command to run the test
         		Process pr = null;
         		try
@@ -544,7 +547,7 @@
 	    lastTest = str;
         }
     }
-    
+
     /**
     * Locate the suite's properties file
     */
@@ -587,6 +590,7 @@
             // because framework may have been set by previous suite
             framework = parentProps.getProperty("framework");
             serverJvm = parentProps.getProperty("serverJvm");
+            serverJvmName = parentProps.getProperty("serverJvmName");
             // Do the same for ij.defaultResourcePackage
             ijdefaultResourcePackage =
                 parentProps.getProperty("ij.defaultResourcePackage");
@@ -606,7 +610,7 @@
         }                
         return p;
     }
-                
+
 
     /**
     * Properties which may be defined for all suites
@@ -639,13 +643,21 @@
 		    javaCmd = "java";
 		else if (javaCmd.equals("jview"))
 		    jvmName = "jview";
-        
-        JavaVersionHolder jvh = new JavaVersionHolder(javaVersion);
+
+		// if j9, we need to check further
+		String javavmVersion;
+		if (System.getProperty("java.vm.name").equals("J9"))
+			javavmVersion = (System.getProperty("java.vm.version"));
+		else
+			javavmVersion = javaVersion;
+
+
+        JavaVersionHolder jvh = new JavaVersionHolder(javavmVersion);
         majorVersion = jvh.getMajorVersion();
         minorVersion = jvh.getMinorVersion();
         iminor = jvh.getMinorNumber();
         imajor = jvh.getMajorNumber();
-        
+
 		if ( (jvmName == null) || (jvmName.equals("jview")) )
 		{
 		    if ( (iminor < 2) && (imajor < 2) )
@@ -653,7 +665,24 @@
 		    else
 		        jvmName = "jdk" + majorVersion + minorVersion;
 		}
-		
+	
+		if (jvmName.equals("j9_13"))
+		{ 
+			javaVersion = javaVersion + " - " + majorVersion + "." + minorVersion;
+			System.out.println("javaVersion now: " + javaVersion);
+			// up to j9 2.1 (jdk 1.3.1. subset) the results are the same for all versions, or
+			// we don't care about it anymore. So switch back to 1.3 (java.version values).
+			if ((imajor <= 2) && (iminor < 2))
+			{
+				majorVersion = "1";
+				minorVersion = "3";
+				imajor = 1;
+				iminor = 3;
+			}
+			else 
+				jvmName = "j9_" + majorVersion + minorVersion;
+		}
+
 		jvmflags = suiteProperties.getProperty("jvmflags");
 		testJavaFlags = suiteProperties.getProperty("testJavaFlags");
 		classpath = suiteProperties.getProperty("classpath");
@@ -682,6 +711,7 @@
 		    topsuitedir = outputdir;
 		bootcp = suiteProperties.getProperty("bootcp");
 		serverJvm = suiteProperties.getProperty("serverJvm");
+		serverJvmName = suiteProperties.getProperty("serverJvmName");
 		canondir = suiteProperties.getProperty("canondir");
 		mtestdir = suiteProperties.getProperty("mtestdir");
 		String usepr = suiteProperties.getProperty("useprocess");
@@ -722,7 +752,7 @@
     		jvmName = "currentjvm";
     	else
     		p.put("jvm", jvmName);
-        
+
         if ( javaCmd == null )
             javaCmd = "java";
         else
@@ -741,7 +771,7 @@
             p.put("bootcp", "bootcp");
         if ( canondir != null )
             p.put("canondir", canondir);
-            
+
 		if ( (outputdir == null) || (outputdir.length() == 0) )
 		{
 		    outputdir = p.getProperty("outputdir");
@@ -756,48 +786,52 @@
 		else
             framework = p.getProperty("framework");
 
-		// same for serverJvm 
+		// same for serverJvm and serverJvmName
         if ( parentProperties.getProperty("serverJvm") != null )
             p.put("serverJvm", serverJvm);
 		else
             serverJvm = p.getProperty("serverJvm");
+        if ( parentProperties.getProperty("serverJvmName") != null )
+            p.put("serverJvmName", serverJvmName);
+		else
+            serverJvmName = p.getProperty("serverJvmName");
 
         // Encryption may be set at the top or just for a subsuite
 	    if ( parentProperties.getProperty("encryption") != null )
 		    p.put("encryption", encryption);
 		else
             encryption = p.getProperty("encryption");
-        
+
 	// Encryption provider may be set at the top or just for a subsuite
 	    if ( parentProperties.getProperty("testEncryptionProvider") != null )
 		    p.put("testEncryptionProvider", testEncryptionProvider);
 		else
             testEncryptionProvider = p.getProperty("testEncryptionProvider");
-        
+
         // jdk12test may be set at the top or just for a subsuite
 	    if ( parentProperties.getProperty("jdk12test") != null )
 		    p.put("jdk12test", jdk12test);
 		else
             jdk12test = p.getProperty("jdk12test");
-       
+
         // jdk12exttest may be set at the top or just for a subsuite
 	    if ( parentProperties.getProperty("jdk12exttest") != null )
 		    p.put("jdk12exttest", jdk12exttest);
 		else
             jdk12exttest = p.getProperty("jdk12exttest");
-        
+
         // jdk14test may be set at the top or just for a subsuite
 	    if ( parentProperties.getProperty("jdk14test") != null )
 		    p.put("jdk14test", jdk14test);
 		else
             jdk14test = p.getProperty("jdk14test");
-       
+
         // runwithibmjvm may be set at the top or just for a subsuite
 	    if ( parentProperties.getProperty("runwithibmjvm") != null )
 		    p.put("runwithibmjvm", runwithibmjvm);
 		else
             runwithibmjvm = p.getProperty("runwithibmjvm");
-       
+
         // runwithjvm may be set at the top or just for a subsuite
 	    String testJVM = (jvmName.startsWith("j9") ? "j9" : jvmName);
 	    if ( parentProperties.getProperty("runwith" + testJVM) != null )
@@ -816,7 +850,7 @@
 		    p.put("excludeJCC", excludeJCC);
 		else
             excludeJCC = p.getProperty("excludeJCC");
-       
+
         // useprocess may be set at the top or just for a subsuite
         String upr = parentProperties.getProperty("useprocess");
 	    if ( upr != null )
@@ -841,9 +875,9 @@
             skipsed = "false";
 		if ( "true".equals(keepfiles) )
 		    p.put("keepfiles", keepfiles);
-            
+
         // testJavaFlags should get appended
-        
+
         String testflags = p.getProperty("testJavaFlags");
         if ( parentProperties.getProperty("testJavaFlags") != null )
         {
@@ -855,7 +889,7 @@
         }
         else
             testJavaFlags = p.getProperty("testJavaFlags");
-            
+
 		// The following could change between suites or
 		// may be set for the whole set of suites
 
@@ -863,15 +897,15 @@
             p.put("reportstderr", reportstderr);
         else
             reportstderr = p.getProperty("reportstderr");
-            
+
         if ( parentProperties.getProperty("timeout") != null )
             p.put("timeout", timeout);
         else
             timeout = p.getProperty("timeout");
-                   
+
         // outcopy is very specific to a single suite
         outcopy = p.getProperty("outcopy");
-        
+
 		// useoutput is very specific to a single suite
 		useoutput = p.getProperty("useoutput");
 
@@ -891,7 +925,7 @@
 		    
         // Set the suite subdir under top outputdir
         setSuiteDir(suiteName, isParent, isTop);
-        
+
         // This individual suite may also have special flags
         // Reset otherSpecialProps in case another suite had any set
         otherSpecialProps = "";
@@ -940,7 +974,7 @@
 	needJdk14 = false;
 	excludedFromJCC = false;
 	needIBMjvm = null;
-        
+
 	// Determine if this is jdk12 or higher (with or without extensions)
         if (iminor >= 2) isJdk12 = true;
 	if ( System.getProperty("java.version").startsWith("1.1.8") ) isJdk118 = true;
@@ -1113,7 +1147,7 @@
 	return result; // last test result is returned
     }
 
-    
+
     public static void setSuiteDir(String suiteName, boolean isParent, boolean isTop)
         throws IOException
     {
@@ -1143,7 +1177,7 @@
             //System.out.println("RunList topsuitedir: " + outputdir);
             //System.out.println("RunList outputdir: " + outputdir);
             //System.out.println("RunList topreportdir: " + topreportdir);
-            
+
             // Modify outputdir for special framework
             if ( (framework != null) && (framework.length()>0) )
             {
@@ -1176,7 +1210,7 @@
                 }
             }
         }
-        
+
 		else if ( upgradetest == null ) // this is a child suite of a parent
 		{
             File suitedir = new File(outputdir, suiteName);
@@ -1185,7 +1219,7 @@
             //System.out.println("Child outputdir: " + outputdir);
         }
     }
-    
+
 	private static void setSpecialProps(Properties p, boolean isTop)
 	{
         // Just build  string for RunTest to parse (^ is the separator)
@@ -1216,3 +1250,4 @@
     }
 	
 }
+

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java?view=diff&r1=151233&r2=151234
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java Thu Feb  3 13:28:29 2005
@@ -72,7 +72,8 @@
 				       "DB2app"};
     static NetServer ns;
     static boolean frameworkInitialized = false;
-    static boolean j9net = false;
+    static boolean jvmnet = false; // switch to see if we need have client & server in a different jvm
+    static String jvmnetjvm; // string for class name of server jvm if different from client jvm
     static String driverName;
     static String dbName;
 
@@ -254,8 +255,18 @@
 	    if ((driverName != null) && (!skiptest) )
 	    {
             System.out.println("Initialize for framework: "+ framework );
-            if (j9net && (framework.startsWith("DerbyNet"))) 
-			    ns = new NetServer(baseDir, "j9_13", classpathServer, null, jvmflags,framework);
+            if (jvmnet && (framework.equals("DB2jNet")  || framework.startsWith("DerbyNet")))
+            {
+                // first check to see if properties were set to use a different jvm for server/client
+                String jvmnetjvm = System.getProperty("serverJvmName");
+                if (jvmnetjvm == null) 
+                {
+                    // default to the latest one we know 
+                    jvmnetjvm = "j9_22";
+                }
+			
+                ns = new NetServer(baseDir, jvmnetjvm, classpathServer, null, jvmflags,framework);
+            }
             else
 			    ns = new NetServer(baseDir, jvmName, classpathServer, javaCmd, jvmflags,framework);
 		    ns.start();
@@ -341,11 +352,19 @@
 
     	boolean status;
 
-    	// only with j9 may the serverJvm be different from jvmName
-    	if (j9net)
+    	// allow for server jvmName to be different from client jvmName
+    	if (jvmnet)
+    	{
+            // first check to see if properties were set to use a different jvm for server/client
+            if (jvmnetjvm == null) 
+            {
+                // default to the latest one we know 
+                jvmnetjvm = "j9_22";
+            }
     	    status = diff.exec(outName, outDir, pwDiff, testOutName,
     		    frameworkMaster, jvmName, iminor, useprocess, systemdiff, canondir, 
-			    canonpath, "j9_13");
+			    canonpath, jvmnetjvm);
+        }
     	else
       	    status = diff.exec(outName, outDir, pwDiff, testOutName,
     		    frameworkMaster, jvmName, iminor, useprocess, systemdiff, canondir, 
@@ -822,6 +841,14 @@
 		else
 		    javaVersion = jvmName;
 
+		//hang on a minute - if j9, we need to check further
+		String javavmVersion;
+		if (sp.getProperty("java.vm.name").equals("J9"))
+			javavmVersion = (sp.getProperty("java.vm.version"));
+		else
+			javavmVersion = javaVersion;
+
+
 		JavaVersionHolder jvh = new JavaVersionHolder(javaVersion);
 		majorVersion = jvh.getMajorVersion();
 		minorVersion = jvh.getMinorVersion();
@@ -841,7 +868,20 @@
                         if (System.getProperty("com.ibm.oti.configuration").equals("foun"))
                             jvmName = "j9_foundation";
                         else
+                        {
+                            // for reporting; first extend javaVersion
+                            javaVersion = javaVersion + " - " + majorVersion + "." + minorVersion;
+                            // up to j9 2.1 (jdk 1.3.1 subset) the results are the same for all versions,
+                            // or we don't care about it anymore. Switch back to 1.3. (java.version) values.
+                            if ((imajor <= 2) && (iminor < 2)) 
+                            { 
+                                majorVersion = "1"; 
+                                minorVersion = "3"; 
+                                imajor = 1; 
+                                iminor = 3; 
+                            } 
                             jvmName = "j9_" + majorVersion + minorVersion;
+                        }
                     }
                     else
                         jvmName = "ibm" + majorVersion + minorVersion;
@@ -1385,8 +1425,8 @@
 	        }
 
             String srvJvm = System.getProperty("serverJvm");
-            if ((srvJvm !=null) && ((srvJvm.toUpperCase().startsWith("J9")) || (srvJvm.equalsIgnoreCase("wsdd5.6"))))
-                j9net = true;
+            if (srvJvm !=null) 
+                jvmnet = true;
 
             String excludeJcc = ap.getProperty("excludeJCC");
             if ( framework.startsWith("DB2") )
@@ -1412,7 +1452,7 @@
 		
 
             // for now we want just want to have a single property
-            // for all j9 versions; use j9_13 for the jvmname
+            // for all j9 versions
             String testJVM = (jvmName.startsWith("j9") ? "j9" : jvmName);
             runwithjvm = ap.getProperty("runwith" + testJVM);
             if  ((runwithjvm != null) && (runwithjvm.equalsIgnoreCase("false")))

Added: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_22.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_22.java?view=auto&rev=151234
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_22.java (added)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/harness/j9_22.java Thu Feb  3 13:28:29 2005
@@ -0,0 +1,136 @@
+/*
+
+   Derby - Class org.apache.derbyTesting.functionTests.harness.j9_22
+
+   Copyright 2002, 2005 The Apache Software Foundation or its licensors, as applicable.
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+ */
+
+package org.apache.derbyTesting.functionTests.harness;
+
+import java.util.Vector;
+import java.util.StringTokenizer;
+import java.util.Properties;
+
+
+/**
+  <p>This class is for IBM's J9 jdk 1.3.1 subset - 2.2
+
+  @author myrna
+ */
+public class j9_22 extends jvm {
+
+	public String getName(){return "j9_22";}
+    public j9_22(boolean noasyncgc, boolean verbosegc, boolean noclassgc,
+    long ss, long oss, long ms, long mx, String classpath, String prof,
+    boolean verify, boolean noverify, boolean nojit, Vector D) {
+        super(noasyncgc,verbosegc,noclassgc,ss,oss,ms,mx,classpath,prof,
+		verify,noverify,nojit,D);
+    }
+    // more typical use:
+    public j9_22(String classpath, Vector D) {
+        super(classpath,D);
+    }
+    // more typical use:
+    public j9_22(long ms, long mx, String classpath, Vector D) {
+        super(ms,mx,classpath,D);
+    }
+    // actual use
+    public j9_22() {
+	Properties sp = System.getProperties();
+	String srvJvm = sp.getProperty("serverJvm");
+	if ((srvJvm!=null) && (srvJvm.toUpperCase().startsWith("J9")))
+	{
+		String wshome = guessWSHome();
+		// note, may have to switch to sep instead of hardcoding the slashes...
+		setJavaCmd(wshome+"/wctme5.7/ive/bin/j9");
+	}
+	else
+		setJavaCmd("j9");
+    }
+
+    // return the command line to invoke this VM.  The caller then adds
+    // the class and program arguments.
+    public Vector getCommandLine() 
+    {
+
+        StringBuffer sb = new StringBuffer();
+        Vector v = super.getCommandLine();
+
+        appendOtherFlags(sb);
+        String s = sb.toString();
+        StringTokenizer st = new StringTokenizer(s);
+        while (st.hasMoreTokens())
+        {
+            v.addElement(st.nextToken());
+        }
+        return v;
+	}
+
+	public void appendOtherFlags(StringBuffer sb)
+	{
+
+	Properties sp = System.getProperties();
+	String bootcp = sp.getProperty("bootcp");
+	String srvJvm = sp.getProperty("serverJvm");
+	// if we're coming in to be the server jvm for networkserver testing on j9,
+	// bootcp is null, so we need to try to setup the bootclasspath from scratch
+	// for now, assume we're only interested in doing this for wctme5.7, worry about
+	// newer versions, multiple class libraries, or multiple releases later.
+	sb.append(" -jcl:max");
+	if ((srvJvm !=null ) && (srvJvm.toUpperCase().startsWith("J9")))
+	{
+		String pathsep = System.getProperty("path.separator");
+		String wshome = guessWSHome();
+		// note, may have to switch to sep instead of hardcoding the slashes...
+		sb.append(" -Xbootclasspath/a:" + wshome + "/wctme5.7/ive/lib/jclMax/classes.zip"
+			+ pathsep + wshome + "/wctme5.7/ive/lib/charconv.zip"
+			+ pathsep + wshome + "/wctme5.7/ive/lib/database_enabler.jar");
+	} 
+	else
+		sb.append(" -Xbootclasspath/a:" + bootcp);
+        if (noasyncgc) warn("j9_22 does not support noasyncgc");
+        if (verbosegc) sb.append(" -verbose:gc");
+        if (noclassgc) warn("j9_22 does not support noclassgc");
+        if (ss>=0) warn("j9_22 does not support ss");
+        if (oss>=0) warn("j9_22 does not support oss");
+        if (ms>=0) {
+          sb.append(" -Xss");
+          sb.append(ms);
+		  //sb.append("k");
+        }
+        if (mx>=0) {
+          sb.append(" -Xmx");
+          sb.append(mx);
+		  //sb.append("k");
+        }
+        if (classpath!=null) warn("j9_22 does not support classpath, use -Xbootclasspath,-Xbootclasspath/p,-Xbootclasspath/a"); 
+        if (prof!=null) warn("j9_22 does not support prof");
+        if (verify) sb.append(" -verify");
+        if (noverify) warn("j9_22 does not support noverify");
+        if (nojit) sb.append(" -Xnojit");
+        if (D != null)
+          for (int i=0; i<D.size();i++) {
+	        sb.append(" -D");
+	        sb.append((String)(D.elementAt(i)));
+          }
+    }
+	public String getDintro() { return "-D"; }
+
+	protected void setSecurityProps()
+	{
+		System.out.println("Note: J9 tests do not run with security manager");		
+	}
+}