diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 02d6b11a3..aa191edf4 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -7,7 +7,7 @@ Copyright (c) 2001-04 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 + it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, @@ -649,7 +649,7 @@ public class Editor extends JFrame implements RunnerListener { URL[] urlList = new URL[archives.length]; for (int j = 0; j < urlList.length; j++) { - urlList[j] = archives[j].toURL(); + urlList[j] = archives[j].toURI().toURL(); } URLClassLoader loader = new URLClassLoader(urlList); diff --git a/app/src/processing/app/debug/Runner.java b/app/src/processing/app/debug/Runner.java index 15884e37e..b78ee41c3 100644 --- a/app/src/processing/app/debug/Runner.java +++ b/app/src/processing/app/debug/Runner.java @@ -3,7 +3,7 @@ /* Part of the Processing project - http://processing.org - Copyright (c) 2004-08 Ben Fry and Casey Reas + Copyright (c) 2004-09 Ben Fry and Casey Reas Copyright (c) 2001-04 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify @@ -379,11 +379,16 @@ public class Runner implements MessageConsumer { //String addr = "localhost:" + (8000 + (int) (Math.random() * 1000)); //String addr = "" + (8000 + (int) (Math.random() * 1000)); - String commandArgs = Base.isWindows() ? - "java -Xrunjdwp:transport=dt_shmem,address=" + addr + ",suspend=y " : + String commandArgs = "java -Xrunjdwp:transport=dt_socket,address=" + addr + ",suspend=y "; - //String commandArgs = "java -agentlib:jdwp=transport=dt_socket,address=" + addr + ",suspend=y "; - //String commandArgs = "java -agentlib:jdwp=transport=dt_socket,address=" + addr + ",server=n,suspend=y "; + if (Base.isWindows()) { + commandArgs = + "java -Xrunjdwp:transport=dt_shmem,address=" + addr + ",suspend=y "; + } else if (Base.isMacOS()) { + commandArgs = + "java -d32 -Xrunjdwp:transport=dt_socket,address=" + addr + ",suspend=y "; + } + for (int i = 0; i < vmParams.length; i++) { commandArgs = addArgument(commandArgs, vmParams[i], ' '); } diff --git a/todo.txt b/todo.txt index 58d65d0b5..f0a968404 100644 --- a/todo.txt +++ b/todo.txt @@ -1,8 +1,11 @@ 0169 pde X Erroneous line highlighting is off by one if there is no setup() routine X http://dev.processing.org/bugs/show_bug.cgi?id=1263 +X Auto-format kills Unicode characters +X http://dev.processing.org/bugs/show_bug.cgi?id=1312 +X tweaks for Mac OS X Snow Leopard, to force it to run in 32-bit mode - +_ System.getProperty("sun.arch.data.model").equals("32"). _ use launch4j when exporting applications for windows? _ post to web example @@ -18,6 +21,28 @@ _ have a means to load them from "teacher" version of p5 _ figure out how to use the +package processing.app.debug; + +import com.sun.jna.Library; +import com.sun.jna.Native; + +public interface CLibrary extends Library { + CLibrary INSTANCE = (CLibrary)Native.loadLibrary("c", CLibrary.class); + int setenv(String name, String value, int overwrite); + String getenv(String name); + int unsetenv(String name); + int putenv(String string); +} + +and then, in Runner.launch(), right before the vm = launcVirtualMachine(....) line I do: + +CLibrary clib = CLibrary.INSTANCE; +clib.setenv("DYLD_LIBRARY_PATH", "/blah/blah", 1); + +It compiles ok, but when I try to run Processing with run.sh, it fails with the following error: +java.lang.NoClassDefFoundError: com/sun/jna/Libray + + _ add proper copyright and license information for all included projects _ http://dev.processing.org/bugs/show_bug.cgi?id=1303