Skip to content

Commit e8e745e

Browse files
committed
moved to jdi, abandoning tools.jar dependency
1 parent 170cb65 commit e8e745e

File tree

9 files changed

+32
-17
lines changed

9 files changed

+32
-17
lines changed

app/.classpath

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@
2121
<classpathentry kind="lib" path="lib/apple.jar"/>
2222
<classpathentry kind="lib" path="test/lib/junit-4.8.1.jar"/>
2323
<classpathentry kind="lib" path="lib/org-netbeans-swing-outline.jar"/>
24+
<classpathentry kind="lib" path="lib/com.ibm.icu_4.4.2.v20110823.jar"/>
25+
<classpathentry kind="lib" path="lib/jdi.jar"/>
26+
<classpathentry kind="lib" path="lib/jdimodel.jar"/>
27+
<classpathentry kind="lib" path="lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar"/>
2428
<classpathentry kind="output" path="bin"/>
2529
</classpath>

app/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
excludes="**/tools/format/**"
117117
encoding="UTF-8"
118118
includeAntRuntime="false"
119-
classpath="../core/library/core.jar; ${env.JAVA_HOME}/lib/tools.jar; lib/ant.jar; lib/ant-launcher.jar; lib/antlr.jar; lib/apple.jar; lib/jdt-core.jar; lib/jna.jar; lib/org-netbeans-swing-outline.jar"
119+
classpath="../core/library/core.jar; lib/ant.jar; lib/ant-launcher.jar; lib/antlr.jar; lib/apple.jar; lib/jdt-core.jar; lib/jna.jar; lib/org-netbeans-swing-outline.jar;lib/com.ibm.icu_4.4.2.v20110823.jar;lib/jdi.jar;lib/jdimodel.jar;lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar"
120120
debug="on">
121121
<src path="src" />
122122
<src path="generated" />

app/src/processing/mode/java/runner/EventThread.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ private void exceptionEvent(ExceptionEvent event) {
363363
// com.sun.jdi.ObjectReference or = event.exception();
364364
// System.out.println("exceptionEvent() fired " + or);
365365
// System.out.println("catch location " + event.catchLocation());
366-
366+
for (ThreadReference thread : vm.allThreads()) {
367+
thread.suspend();
368+
}
367369
parent.exception(event);
368370

369371
/*

app/src/processing/mode/java/runner/Runner.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -329,16 +329,13 @@ protected VirtualMachine launchVirtualMachine(String[] vmParams,
329329
// Using localhost instead of 127.0.0.1 sometimes causes a
330330
// "Transport Error 202" error message when trying to run.
331331
// http://dev.processing.org/bugs/show_bug.cgi?id=895
332-
String addr = "127.0.0.1:" + (8000 + (int) (Math.random() * 1000));
332+
// String addr = "127.0.0.1:" + (8000 + (int) (Math.random() * 1000));
333333
//String addr = "localhost:" + (8000 + (int) (Math.random() * 1000));
334-
//String addr = "" + (8000 + (int) (Math.random() * 1000));
334+
String addr = "" + (8000 + (int) (Math.random() * 1000));
335335

336336
String commandArgs =
337337
"java -Xrunjdwp:transport=dt_socket,address=" + addr + ",suspend=y ";
338-
if (Base.isWindows()) {
339-
commandArgs =
340-
"java -Xrunjdwp:transport=dt_shmem,address=" + addr + ",suspend=y ";
341-
} else if (Base.isMacOS()) {
338+
if (Base.isMacOS()) {
342339
// Decided to just set this to 1.6 only, because otherwise it's gonna
343340
// be a shitshow if folks are getting Apple's 1.6 with 32-bit and
344341
// Oracle's 1.7 when run in 64-bit mode. ("Why does my sketch suck in
@@ -484,7 +481,7 @@ protected void generateTrace(PrintWriter writer) {
484481
//if (writer != null) {
485482
eventThread = new EventThread(this, vm, excludes, writer);
486483
eventThread.start();
487-
eventThread.setEventRequests(watchFields);
484+
//eventThread.setEventRequests(watchFields); //redundant?
488485
//}
489486

490487
//redirectOutput();
@@ -538,9 +535,9 @@ protected void generateTrace(PrintWriter writer) {
538535

539536

540537
protected Connector findConnector(String connectorName) {
541-
List connectors = Bootstrap.virtualMachineManager().allConnectors();
542-
// List connectors =
543-
// org.eclipse.jdi.Bootstrap.virtualMachineManager().allConnectors();
538+
// List connectors = Bootstrap.virtualMachineManager().allConnectors();
539+
List connectors =
540+
org.eclipse.jdi.Bootstrap.virtualMachineManager().allConnectors();
544541

545542
// debug: code to list available connectors
546543
// Iterator iter2 = connectors.iterator();

build/build.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@
7878
<include name="app/lib/ant.jar" />
7979
<include name="app/lib/ant-launcher.jar" />
8080
<include name="app/lib/org-netbeans-swing-outline.jar" />
81+
<include name="app/lib/jdi.jar" />
82+
<include name="app/lib/jdimodel.jar" />
83+
<include name="app/lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar" />
84+
<include name="app/lib/com.ibm.icu_4.4.2.v20110823.jar" />
8185
</fileset>
8286

8387
<target name="build" description="Build Processing.">

build/linux/processing

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
# JARs required from JDK (anywhere in/below the JDK home directory)
20-
JDKLIBS="rt.jar tools.jar"
20+
JDKLIBS="rt.jar"
2121

2222
# Set this to non-zero for logging
2323
LOGGING=0

build/macosx/template.app/Contents/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<!-- In 0149, removed /System/Library/Java from the CLASSPATH because
8585
it can cause problems if users have installed weird files there.
8686
http://dev.processing.org/bugs/show_bug.cgi?id=1045 -->
87-
<string>$JAVAROOT/lib/pde.jar:$JAVAROOT/core/library/core.jar:$JAVAROOT/lib/ant.jar:$JAVAROOT/lib/ant-launcher.jar:$JAVAROOT/lib/antlr.jar:$JAVAROOT/lib/jna.jar:$JAVAROOT/lib/org-netbeans-swing-outline.jar</string>
87+
<string>$JAVAROOT/lib/pde.jar:$JAVAROOT/core/library/core.jar:$JAVAROOT/lib/ant.jar:$JAVAROOT/lib/ant-launcher.jar:$JAVAROOT/lib/antlr.jar:$JAVAROOT/lib/jna.jar:$JAVAROOT/lib/org-netbeans-swing-outline.jar:$JAVAROOT/lib/com.ibm.icu_4.4.2.v20110823.jar:$JAVAROOT/lib/jdi.jar:$JAVAROOT/lib/jdimodel.jar:$JAVAROOT/lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar</string>
8888

8989
<!-- More properties can be found in http://developer.apple.com/releasenotes/Java/java141/system_properties/chapter_4_section_1.html#//apple_ref/doc/uid/TP30000285 -->
9090
<key>Properties</key>

build/windows/launcher/config-cmd.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@
2020
<cp>lib/jna.jar</cp>
2121
<cp>lib/antlr.jar</cp>
2222
<cp>lib/ant.jar</cp>
23-
<cp>lib/ant-launcher.jar</cp>
23+
<cp>lib/ant-launcher.jar</cp>
2424
<cp>lib/org-netbeans-swing-outline.jar</cp>
25-
<cp>%EXEDIR%/java/lib/tools.jar</cp>
25+
<cp>lib/com.ibm.icu_4.4.2.v20110823.jar</cp>
26+
<cp>lib/jdi.jar</cp>
27+
<cp>lib/jdimodel.jar</cp>
28+
<cp>lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar</cp>
29+
<!-- <cp>%EXEDIR%/java/lib/tools.jar</cp> -->
2630
</classPath>
2731
<jre>
2832
<path>java</path>

build/windows/launcher/config.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
<cp>lib/ant.jar</cp>
2323
<cp>lib/ant-launcher.jar</cp>
2424
<cp>lib/org-netbeans-swing-outline.jar</cp>
25-
<cp>%EXEDIR%/java/lib/tools.jar</cp>
25+
<cp>lib/com.ibm.icu_4.4.2.v20110823.jar</cp>
26+
<cp>lib/jdi.jar</cp>
27+
<cp>lib/jdimodel.jar</cp>
28+
<cp>lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar</cp>
29+
<!-- <cp>%EXEDIR%/java/lib/tools.jar</cp> -->
2630
</classPath>
2731
<jre>
2832
<path>java</path>

0 commit comments

Comments
 (0)