1 21 22 package org.apache.derbyTesting.functionTests.harness; 23 import java.util.Vector ; 24 import java.util.StringTokenizer ; 25 import java.util.Properties ; 26 27 32 public class j9_foundation extends jvm { 33 34 public String getName(){return "j9_foundation";} 35 public j9_foundation(boolean noasyncgc, boolean verbosegc, boolean noclassgc, 36 long ss, long oss, long ms, long mx, String classpath, String prof, 37 boolean verify, boolean noverify, boolean nojit, Vector D) { 38 super(noasyncgc,verbosegc,noclassgc,ss,oss,ms,mx,classpath,prof, 39 verify,noverify,nojit,D); 40 } 41 public j9_foundation(String classpath, Vector D) { 43 super(classpath,D); 44 } 45 public j9_foundation(long ms, long mx, String classpath, Vector D) { 47 super(ms,mx,classpath,D); 48 } 49 public j9_foundation() { 51 Properties sp = System.getProperties(); 52 String srvJvm = sp.getProperty("serverJvm"); 53 if ((srvJvm!=null) && (srvJvm.toUpperCase().startsWith("J9"))) 54 { 55 String wshome = guessWSHome(); 56 setJavaCmd(wshome+"/wctme5.7/ive/bin/j9"); 58 } 59 else 60 setJavaCmd("j9"); 61 } 62 63 public Vector getCommandLine() 66 { 67 StringBuffer sb = new StringBuffer (); 68 Vector v = super.getCommandLine(); 69 appendOtherFlags(sb); 70 String s = sb.toString(); 71 StringTokenizer st = new StringTokenizer (s); 72 while (st.hasMoreTokens()) 73 { 74 v.addElement(st.nextToken()); 75 } 76 return v; 77 } 78 79 public void appendOtherFlags(StringBuffer sb) 80 { 81 Properties sp = System.getProperties(); 82 String bootcp = sp.getProperty("bootcp"); 83 String srvJvm = sp.getProperty("serverJvm"); 84 sb.append(" -jcl:foun10"); 89 90 if ((srvJvm !=null ) && (srvJvm.toUpperCase().startsWith("J9"))) 91 { 92 String pathsep = System.getProperty("path.separator"); 93 String wshome = guessWSHome(); 94 sb.append(" -Xbootclasspath/a:" + wshome + "/wctme5.7/ive/lib/jclFoundation10/classes.zip" 98 + pathsep + wshome + "/wctme5.7/ive/lib/jclFoundation10/locale.zip" 99 + pathsep + wshome + "/wctme5.7/ive/lib/jdbc.jar"); 100 } 101 else 102 sb.append(" -Xbootclasspath/a:" + bootcp); 103 if (noasyncgc) warn("j9_foundation does not support noasyncgc"); 104 if (verbosegc) sb.append(" -verbose:gc"); 105 if (noclassgc) warn("j9_foundation does not support noclassgc"); 106 if (ss>=0) warn("j9_foundation does not support ss"); 107 if (oss>=0) warn("j9_foundation does not support oss"); 108 if (ms>=0) { 109 sb.append(" -Xss"); 110 sb.append(ms); 111 } 113 if (mx>=0) { 114 sb.append(" -Xmx"); 115 sb.append(mx); 116 } 118 if (classpath!=null) warn("j9_foundation does not support classpath, use -Xbootclasspath,-Xbootclasspath/p,-Xbootclasspath/a"); 119 if (prof!=null) warn("j9_foundation does not support prof"); 120 if (verify) sb.append(" -verify"); 121 if (noverify) warn("j9_foundation does not support noverify"); 122 if (nojit) sb.append(" -Xnojit"); 123 if (D != null) 124 for (int i=0; i<D.size();i++) { 125 sb.append(" -D"); 126 sb.append((String )(D.elementAt(i))); 127 } 128 } 129 public String getDintro() { return "-D"; } 130 131 140 } 141 | Popular Tags |