equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
111 /* |
111 /* |
112 * Launch a server debuggee with the given address |
112 * Launch a server debuggee with the given address |
113 */ |
113 */ |
114 private static Process launch(String address, String class_name) throws IOException { |
114 private static Process launch(String address, String class_name) throws IOException { |
115 String exe = System.getProperty("java.home") |
115 String exe = System.getProperty("java.home") |
116 + File.separator + "bin" + File.separator; |
116 + File.separator + "bin" + File.separator + "java"; |
117 String arch = System.getProperty("os.arch"); |
|
118 String osname = System.getProperty("os.name"); |
|
119 if (osname.equals("SunOS") && arch.equals("sparcv9")) { |
|
120 exe += "sparcv9/java"; |
|
121 } else if (osname.equals("SunOS") && arch.equals("amd64")) { |
|
122 exe += "amd64/java"; |
|
123 } else { |
|
124 exe += "java"; |
|
125 } |
|
126 String cmd = exe + " " + VMConnection.getDebuggeeVMOptions() + |
117 String cmd = exe + " " + VMConnection.getDebuggeeVMOptions() + |
127 " -agentlib:jdwp=transport=dt_socket" + |
118 " -agentlib:jdwp=transport=dt_socket" + |
128 ",server=y" + ",suspend=y" + ",address=" + address + |
119 ",server=y" + ",suspend=y" + ",address=" + address + |
129 " " + class_name; |
120 " " + class_name; |
130 |
121 |