113 * Execute a process with an -agentpath or -agentlib command option |
113 * Execute a process with an -agentpath or -agentlib command option |
114 * plus any set of other java options. |
114 * plus any set of other java options. |
115 */ |
115 */ |
116 public void runit(String class_name, String vm_options[]) |
116 public void runit(String class_name, String vm_options[]) |
117 { |
117 { |
118 String jre_home = System.getProperty("java.home"); |
118 String sdk_home = System.getProperty("java.home"); |
119 String sdk_home = (jre_home.endsWith("jre") ? |
|
120 (jre_home + File.separator + "..") : |
|
121 jre_home ); |
|
122 String cdir = System.getProperty("test.classes", "."); |
119 String cdir = System.getProperty("test.classes", "."); |
123 String os_arch = System.getProperty("os.arch"); |
120 String os_arch = System.getProperty("os.arch"); |
124 String os_name = System.getProperty("os.name"); |
121 String os_name = System.getProperty("os.name"); |
125 String libprefix = os_name.contains("Windows")?"":"lib"; |
122 String libprefix = os_name.contains("Windows")?"":"lib"; |
126 String libsuffix = os_name.contains("Windows")?".dll": |
123 String libsuffix = os_name.contains("Windows")?".dll": |
127 os_name.contains("OS X")?".dylib":".so"; |
124 os_name.contains("OS X")?".dylib":".so"; |
128 boolean hprof = demo_name.equals("hprof"); |
125 boolean hprof = demo_name.equals("hprof"); |
129 String java = jre_home |
126 String java = sdk_home |
130 + File.separator + "bin" |
127 + File.separator + "bin" |
131 + File.separator + "java"; |
128 + File.separator + "java"; |
132 /* Array of strings to be passed in for exec: |
129 /* Array of strings to be passed in for exec: |
133 * 1. java |
130 * 1. java |
134 * 2. -Dtest.classes=. |
131 * 2. -Dtest.classes=. |