From fd052dd4edadee44db84ffff5e8aeedea3684061 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 23 Oct 2012 17:08:28 +0000 Subject: [PATCH] don't use --request on OS X 10.6, it's not available --- .../processing/mode/java/runner/Runner.java | 28 +++++++++++++------ todo.txt | 11 ++++---- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/app/src/processing/mode/java/runner/Runner.java b/app/src/processing/mode/java/runner/Runner.java index 256320561..f082b945b 100644 --- a/app/src/processing/mode/java/runner/Runner.java +++ b/app/src/processing/mode/java/runner/Runner.java @@ -337,16 +337,26 @@ public class Runner implements MessageConsumer { commandArgs = "java -Xrunjdwp:transport=dt_shmem,address=" + addr + ",suspend=y "; } else if (Base.isMacOS()) { - // This will run a 32-bit VM (likely 1.6) or a 64-bit VM (probably 1.7) - // based on Apple's recent changes. The --request flag will prompt to - // install a JVM if none is available. Or if only Java 7 is installed, - // and 32-bit is requested, this will download Apple's 32-bit Java 6. - // ...decided to just set this to 1.6 only, it's gonna be a shitshow - // if folks are getting Apple's 1.6 with 32-bit and Oracle's 1.7 when - // run in 64-bit mode. + // Decided to just set this to 1.6 only, because otherwise it's gonna + // be a shitshow if folks are getting Apple's 1.6 with 32-bit and + // Oracle's 1.7 when run in 64-bit mode. ("Why does my sketch suck in + // 64-bit? Why is retina broken?) + // The --request flag will prompt to install Apple's 1.6 JVM if none is + // available. We're specifying 1.6 so that we can get support for both + // 32- and 64-bit, because Oracle won't be releasing Java 1.7 in 32-bit. + // Helpfully, the --request flag is not present on Mac OS X 10.6 + // (luckily it is also not needed, because 1.6 is installed by default) + // but it requires an additional workaround to not use that flag, + // otherwise will see an error about an unsupported option. The flag is + // available with 10.7 and 10.8, the only other supported versions of + // OS X at this point, because we require 10.6.8 and higher. That also + // means we don't need to check for any other OS versions, unless + // is a douchebag and modifies Info.plist to get around the restriction. commandArgs = - "/usr/libexec/java_home --request --version 1.6 " + - "-d" + Base.getNativeBits() + " -exec java " + + "/usr/libexec/java_home " + + (System.getProperty("os.version").startsWith("10.6") ? "" : "--request ") + + "--version 1.6 " + + "-d" + Base.getNativeBits() + " --exec java " + "-Xrunjdwp:transport=dt_socket,address=" + addr + ",suspend=y "; } diff --git a/todo.txt b/todo.txt index 84202c541..bb73725f4 100644 --- a/todo.txt +++ b/todo.txt @@ -13,14 +13,13 @@ o caretBlinks always true.. just remove the pref? o blockCaret always false.. remove it? X report from someone about blinking caret X http://code.google.com/p/processing/issues/detail?id=1136 +X added caret options +X editor.caret.blink = true +X editor.caret.block = false X see if commander is still headless +X check to see if sketchbook is getting picked up for cmd line +X don't use --request on OS X 10.6, it's not available -_ don't use --request on OS X, not available - -_ check to see if sketchbook is getting picked up for cmd line - -editor.caret.blink = true -editor.caret.block = false _ processing-java ClassNotFoundException: BatchCompiler (Linux) _ http://code.google.com/p/processing/issues/detail?id=1334