We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › Cannot Run Example Sketches Out of the Box
Page Index Toggle Pages: 1
Cannot Run Example Sketches Out of the Box (Read 2553 times)
Cannot Run Example Sketches Out of the Box
Jan 17th, 2008, 9:53pm
 
I recently migrated to a new machine, an Intel Mac Pro running Leopard, and I just installed Processing about an hour ago. I can run some Processing apps from the examples directory, but others give me a "java.io.IOException: java: not found" exception when I try to run them. See the stack trace at the bottom of this post

I'm running the stock Java that came installed on the machine --
$ java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

A quick google search brought me to this thread: http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1192071562

One thing that was mentioned in the above thread is the ~/.MacOSX/environment.plist (although what was done to that file to remedy the problem is not said). Prior to installing Processing, I did monkey with my environment.plist file to get some Ruby scripts running. I modified this file weeks prior to installing Processing. Is it possible that my creation of this file prevented the Processing installer from doing something?

Following further debugging advice from the thread linked to above, I created a new sketch with the following line
println(System.getenv("PATH"));
When I run it, Processing in its entirety freezes. (Although I suspect this is a Java issue and not a Processing issue.)

Here is the stack trace when I try to run about 50% of the example files. This one was generated by Topics > GUI > Scrollbar

If anyone knows how I can fix this problem, please let me know.

java.io.IOException: java: not found

at java.lang.UNIXProcess.forkAndExec(Native Method)

at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)

at java.lang.Runtime.execInternal(Native Method)

at java.lang.Runtime.exec(Runtime.java:566)

at java.lang.Runtime.exec(Runtime.java:491)

at java.lang.Runtime.exec(Runtime.java:457)

at processing.app.Runner.startExternalRuntime(Runner.java:237)

at processing.app.Runner.start(Runner.java:76)

at processing.app.Editor.handleRun(Editor.java:1112)

at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:316)

at java.awt.Component.processMouseEvent(Component.java:5163)

at java.awt.Component.processEvent(Component.java:4963)

at java.awt.Container.processEvent(Container.java:1613)

at java.awt.Component.dispatchEventImpl(Component.java:3681)

at java.awt.Container.dispatchEventImpl(Container.java:1671)

at java.awt.Component.dispatchEvent(Component.java:3543)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3239)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172)

at java.awt.Container.dispatchEventImpl(Container.java:1657)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3543)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
34)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184
)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

java.io.IOException: java: not found

at java.lang.UNIXProcess.forkAndExec(Native Method)

at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)

at java.lang.Runtime.execInternal(Native Method)

at java.lang.Runtime.exec(Runtime.java:566)

at java.lang.Runtime.exec(Runtime.java:491)

at java.lang.Runtime.exec(Runtime.java:457)

at processing.app.Runner.startExternalRuntime(Runner.java:237)

at processing.app.Runner.start(Runner.java:76)

at processing.app.Editor.handleRun(Editor.java:1112)

at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:316)

at java.awt.Component.processMouseEvent(Component.java:5163)

at java.awt.Component.processEvent(Component.java:4963)

at java.awt.Container.processEvent(Container.java:1613)

at java.awt.Component.dispatchEventImpl(Component.java:3681)

at java.awt.Container.dispatchEventImpl(Container.java:1671)

at java.awt.Component.dispatchEvent(Component.java:3543)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3527)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3239)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3172)

at java.awt.Container.dispatchEventImpl(Container.java:1657)

at java.awt.Window.dispatchEventImpl(Window.java:1606)

at java.awt.Component.dispatchEvent(Component.java:3543)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:2
34)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:184
)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Re: Cannot Run Example Sketches Out of the Box
Reply #1 - Jan 18th, 2008, 3:30pm
 
I have fixed the problem, and it was my ~/.MacOSX/environment.plist. The trick was to make sure the path in environment.plist contained all the entries of my bash path.

For those of you unfamiliar with how to do this, I opened a Terminal, typed "echo $PATH", then copy-and-pasted the string into my ~/.MacOSX/environment.plist

For those with sheer morbid curiosity, my environment.plist is below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

<key>PATH</key>

<string>/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/lib/postgresql8
2/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/usr/lo
cal/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin</string>
</dict>
</plist>
Page Index Toggle Pages: 1