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.
IndexProgramming Questions & HelpIntegration › processing in Puppy Linux
Page Index Toggle Pages: 1
processing in Puppy Linux (Read 1337 times)
processing in Puppy Linux
Nov 13th, 2008, 2:13pm
 
Hi,
I'm new to this forum. I used shortly processing under mac os x but now I moved to linux, so I'm trying to install processing here.

I get the following error when I start processing:
# ./processing
BusyBox v1.8.2 (2007-11-30 09:20:42 GMT-8) multi-call binary

Usage: dirname FILENAME

Strip non-directory suffix from FILENAME

Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base
Caused by: java.lang.ClassNotFoundException: processing.app.Base
       at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: processing.app.Base.  Program will exit.

What I did, step by step, is:
1) download and install (to /usr/local)
sdk-6u10-nb-6_1-linux-ml.sh
2) added to my /etc/profile:
export PATH=$PATH:/usr/local/jdk1.6.0_10/bin
export JAVA_HOME=/usr/local/jdk1.6.0_10
3)download and install processing0156 (also to /usr/local)
4) moved the java folder within processing folder to java_bak
5) (from processing folder) ln -s /usr/local/jdk1.6.0_10 java

Java seems to work ok, I did a test on a very simple HelloWorld.java file and it worked, however, I receive this error when I start processing.
I googled around and checked the forum, but cannot go further with it.

Thanks for your help.
Best regards,
Libero Mureddu
Re: processing in Puppy Linux
Reply #1 - Nov 13th, 2008, 6:48pm
 
looks like the 'dirname' function isn't supported by your shell. the processing shell script uses dirname to get an absolute path to the installation. you should hand-edit the 'processing' shell script to make it work for your machine without dirname.
Re: processing in Puppy Linux
Reply #2 - Nov 13th, 2008, 7:42pm
 
Hi, thanks for your answer.
I'm still a newbie, so I can be wrong, but I tried the following in a terminal and it seems to work.

# dirname /usr/local/processing-0156/
/usr/local

However, I noticed that in the script there are two lines:
java/lib/rt.jar \
java/lib/tools.jar \

However, in my java installation, tools.jar is in the java/lib directory, while rt.jar is in java/jre/lib (where the "java" folder is the symlink to my sdk installation). But I have no idea if this is a problem or not.

Thanks,
Libero
Re: processing in Puppy Linux
Reply #3 - Nov 13th, 2008, 10:34pm
 
Hi, I solved it changing this line,

APPDIR="$(dirname -- "${0}")"

to

APPDIR=/usr/local/processing-0156

and now it works (even if I don't have any idea about why the original line didn't work. I guess it's probably related with dirname, as you said).

Thanks a lot,
Libero Mureddu
Page Index Toggle Pages: 1