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 › Errors importing after running macosx_setup.comman
Page Index Toggle Pages: 1
Errors importing after running macosx_setup.comman (Read 2325 times)
Errors importing after running macosx_setup.comman
Oct 11th, 2007, 4:59am
 
Hi there,

In order to get the serial library working on OS-X, I ran the macosx_setup.command file and then rebooted.
After I started up processing again, it seems that any sketch which I run that tries to import a processing library fails with the message:

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:222)
at processing.app.Runner.start(Runner.java:74)
at processing.app.Editor.handleRun(Editor.java:1222)
at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:324)
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:222)
at processing.app.Runner.start(Runner.java:74)
at processing.app.Editor.handleRun(Editor.java:1222)
at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:324)
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)


From what I have read online, these sorts of errors usually indicate that Java isn't in the path, but I am certain it it. As well, sketches that don't import any libraries seem to work fine (though have trouble running when exported...)

Anyone have any ideas how I could fix thie?  I have tried reinstalling java, and downloading different versions of processing...
Re: Errors importing after running macosx_setup.co
Reply #1 - Oct 11th, 2007, 8:23am
 
Hmm, after experimenting some more and trying different $PATHs, I found that if I run processing by doing a "Show Contents" on processing.app, and running "JavaApplicationStub" it works just fine...
As far as I can tell this is like running it in the terminal.  Now if only I could figure out why I can't just double click on it....
Re: Errors importing after running macosx_setup.co
Reply #2 - Oct 11th, 2007, 2:52pm
 
that's awfully weird. what happens when you type "java" in a terminal window?

i don't suppose you installed one of the developer releases of java?
Re: Errors importing after running macosx_setup.co
Reply #3 - Oct 11th, 2007, 4:43pm
 
Typing java in the terminal gives me the list of java options (as it should), and java -version gives me:

java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)

No developer version of java.

This is on a Macbook Pro with os-x 10.4 and all the latest updates.  

It almost seems as though $PATH isn't being used when I double click on processing.app....  The same problem appeared in mobile processing at the same time.  

It's very strange becasue running the macosx_setup.command and rebooting are the only things I did between it working and not-working.  I've tried undoing, and redoing the changes made by it, but to no avail (besides which, they look to be harmless changes...)
Re: Errors importing after running macosx_setup.co
Reply #4 - Oct 12th, 2007, 12:46pm
 
maybe try a blank processing sketch with:

println(System.getenv("PATH"));

and let me know what's inside? i'm pretty stumped on this.
Re: Errors importing after running macosx_setup.co
Reply #5 - Oct 15th, 2007, 2:36am
 
Alright, I figured it out, and it was a result of me mucking around in ~/.MacOSX/Environment.plist .  I deleted some values in there that I thought were doing nothing, but the problem didn't manifest itself until I rebooted.  
So really it was not a problem with the setup.command, but with me having to reboot after it Wink
Oops.
Thanks for your help though!
Page Index Toggle Pages: 1