Arduino IDE 1.0 On Linux Mint 12

Hey guys, the IDE just won't work on Mint 12, I've checked the dependencies and it's all good. :~

When I try to run, I get this error:

dirname: extra operand `de'
Try `dirname --help' for more information.
Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base
Caused by: java.lang.ClassNotFoundException: processing.app.Base
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: processing.app.Base.  Program will exit.

I thought it was something with JDK, but this is my java version:

mauro@Fisica-Lab ~/Área de trabalho/arduino-1.0 $ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

Note: I'm having the same problems when I try to run MPIDE and Processing IDE too.

Does anyone knows how can I fix it?

Thks a lot!

I can't fix it but I didn't want you to feel alone. I also am using mint 12 and have the exact same problem. It's not a java problem. it's a processing problem. See this part "processing/app/Base" But I can run processing just fine, go figure. If I can get this to work I will post how I did it. And maybe you could do the same.

Thanks

I got it to work!! But I needed to build Arduino from git. I followed these instructions:
http://code.google.com/p/arduino/wiki/BuildingArduino
It's a small pain but if you follow the instructions it should work.

I made the mistake of building it as root. Then I needed to change ownerships and permissions but that's not hard. I then wrote a very small script to have something to start arduino without having to do all the cd to build and run ant. It now works fine.

Go for it, it's easy.

Oh but now it's not in the mint database of programs so you have to build it from git if you want to upgrade it some day. I am putting the web page in the directory so I have a copy on hand at all times.

Told you I would post how to get it to work 8) XD 8) :smiley:

It looks like the problem is with this line in the "arduino" launch script:

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

This is supposed to figure out what directory the arduino software is in, even if the "arduino" script is a symbolic link. It looks like readlink isn't returning something that dirname can handle. Anyone have an idea of how to change it? I'd suggest posting follow-ups on the Google Code issue list (Google Code Archive - Long-term storage for Google Code Project Hosting.) so they don't get lost.

@mellis: Mine does OK. Are you certain that is the shell script the OP is running?

If I cd to the arduino-1.0 directory and enter "./arduino" in a shell script, that script does this:

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

That runs the script that is in that local directory (/home/user/arduino-1.0).

If I cd to the arduino-1.0 directory and enter "arduino" (no "./"), that script does this:

APPDIR=/usr/share/arduino

This second runs the script in "/usr/bin", and that is the APPDIR there.

Don't know if that makes a difference here tho.

edit: This is Ubuntu v11.10

If you do a google search you will find this problem goes all the way back to version 18! I am sure it is in the arduino package but seems to be fixed in the git repository. I could not run arduino 1.0 under Mint but I could under Debian. (I had recently changed my OS.) But when I installed processing it ran fine. This told me that java wasn't the problem. There are lots of posts on this error about making sure java is installed correctly and making sure classpath is correct and reinstalling the AVR tool chain. These are all dead ends.

I didn't pour over the change log but building from git is easy and it gives one the latest version. In my opinion it would be a waste of time to try and fix an existing version that has this error. Just build it new and you are good to go. And once you do that it is very easy to keep up to date with the latest version.

But if one wants to reinvent the wheel go for it.

mellis:
It looks like the problem is with this line in the “arduino” launch script:

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

This is supposed to figure out what directory the arduino software is in, even if the “arduino” script is a symbolic link. It looks like readlink isn’t returning something that dirname can handle. Anyone have an idea of how to change it? I’d suggest posting follow-ups on the Google Code issue list (http://code.google.com/p/arduino/issues/list) so they don’t get lost.

This is not where the problem is. It’s easy to see just do an echo $APPDIR > and see what you get. I got the correct directory so I know that is not the problem but I still have the error. But if you look at the very last part of the very last line you find processing.app.base . This is what is causing the error.

But why? If you look at this line of the script:
export PATH="{APPDIR}/java/bin:{PATH}"
and you found out what APPDIR is using echo $APPDIR > you will find that java doesn’t exist under APPDIR. So the first part of the PATH is incorrect but the second finds java. But the java it finds knows nothing about processing.app.base. So it throws the error.

The ${APPDIR}/java/bin is the directory structure of processing not arduino so go figure.

So the first part of the PATH is incorrect but the second finds java. But the java it finds knows nothing about processing.app.base. So it throws the error.

I agree with the first part, but not the second part. I commented out that line in my arduino shell script, and the IDE still ran. So the Java in my PATH, according to your logic, does know about processing.app.base.

Ubuntu v11.10

SurferTim, thank you for posting that. I just ran into this problem on Linux Mint 12, after manually upgrading from the Arduino 022 it had in the package manager to Arduino 1.0. Googled for my problem and found your solution. It worked great. Thanks.
Wonder why 1.0 isn't in the package manager yet?