Arduino on Ubuntu Edgy - troubles with jikes

Hi everyone,

I’m trying to set up my Arduino on Ubuntu Edgy, by following this howto:

[I don’t change my repositories, though, since I get to install all the packages (gcc-avr avr-libc uisp jikes j2re1.4 j2sdk1.4) with the multiverse and universe repositories in Edgy]

Compiling goes ok, but when I execute I get:

x$ ./ 
[: 51: ==: unexpected operator

It appears that the version of Jikes distributed with Processing
cannot properly run on this system.

Possible solutions:

+ If you already have Jikes installed on your system, you may
just need to remove the version that is included with Processing.

+ You probably just need to track down a version of Jikes that will
work with your distribution.

+ You may need to install the rpm/package for compat-libstdc++
This is what it takes to get things running on most versions
of RedHat Linux or Fedora Core.

+ If all else fails, or if you just like building stuff yourself,
you can download the source for Jikes from SourceForge:
And it just takes a simple ./configure and make, followed by
copying src/jikes to the processing-XXXX folder and you should
be all set.

If you get stuck, ask questions online from the helpful folks via
the Processing discussion board:

Good luck!

Here is the versions of java and jikes:

$ java -version
java version "1.4.2-02"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode)
$ jikes -version
Jikes Compiler - Version 1.22 - 3 October 2004
Copyright (C) IBM Corporation 1997-2003, 2004.
- Licensed Materials - Program Property of IBM - All Rights Reserved.
Originally written by Philippe Charles and David Shields of IBM Research,
Jikes is now maintained and refined by the Jikes Project at:
Please consult this URL for more information and for reporting problems.

I use this java:

$ sudo update-alternatives --config java

There are 5 alternatives which provide `java'.

  Selection    Alternative
          1    /usr/bin/gij-wrapper-4.1
          2    /usr/lib/jvm/java-gcj/jre/bin/java
          3    /usr/lib/j2re1.5-sun/bin/java
          4    /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
*+        5    /usr/lib/j2se/1.4/bin/java

Press enter to keep the default[*], or type selection number:

Does someone know how to solve this?


Hmm... not sure you even need the jikes test at all. Trying editing work/arduino and removing the line containing jikes and everything following it, except for the java line. Then try again.

Thanks! It now works! I tried just running the command "java " yesterday, but uncommenting all other lines in work/arduino did the trick!


I was having the exact same problem...I'll have to try this fix ASAP. Thanks in advance!

Works like a charm! for me, too. but I get an error when the ide starts: "Could not find compiler. arv-g++ is missing from your PATH."

avr-gcc is the newest version. Must be a simple fix, but I'm not an expert at linux, by any means.

You need avr-g++ (the C++ compiler) as well as avr-gcc (the C compiler). Perhaps it's a separate package? Or if you did install avr-g++, is it in your path?

locate avr-g++ /usr/bin/avr-g++

export shows my path is: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games"

So It looks like it's there, and the directory is in the path. If it's a seperate package, I don't know what the package name is.

Sorry for hijacking this thread!

Huh. Are you launching the IDE from a terminal/shell (i.e. wherever you got export to dump your path)? Maybe if you launch from a GUI, you get a different path?

Well, I'm launching from a terminal in linux -- ./

Actually, I found a whole thread about this. I guess it's a bug. There's a patch:

But I don't know how to use it.

That patch has been incorporated into the Arduino source, so you shouldn't need to apply it yourself.

Does the error message really say "arv-g++" (instead of "avr-g++")? Because that would be a problem.

You might try commenting out these two lines in build/linux/work/arduino:

PATH=`pwd`/`dirname $0`:`pwd`/java/bin:${PATH}
export PATH

I’m using Kubuntu Edgy 6.10, and in my case I get error message like this, when I run ./

Error: could not find
Error: could not find Java 2 Runtime Environment.

I think I set my CLASSPATH to the right place, but do I have to set my PATH to this directory as well ?

This is what I have set right now :

ubuntu@ubuntu:~/arduino-0006/build/linux$ echo $CLASSPATH

ubuntu@ubuntu:~/arduino-0006/build/linux$ echo $PATH

I’m still a newbie, but how do I tell java to look in the rigt place ?


isachan: it's probably controlled by the LD_LIBRARY_PATH variable. Do you have on your machine?

I believe I do.

it's in : /usr/lib/j2se/1.4/jre/lib/i386/

So, how do I set this path to LD_LIBRARY_PATH ?

Like this ? set LD_LIBRARY_PATH=/usr/lib/j2se/1.4/jre/lib/i386/


You can edit the script in ARDUINO/build/linux/work/arduino (which gets copied from build/linuxdist/arduino when you run and add the directory to the LD_LIBRARY_PATH there.

Arrgh. I edited the arduino script like you've told me as below :

put the directory with the native RXTX libs in the library path


LD_LIBRARY_PATH=/usr/lib/j2se/1.4/jre/lib/i386:pwd/lib:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH

And still it can't find the

I get the same error message when I type just 'java'.

I don't know what else I can do to solve this problem.


I'm a bit baffled and don't know much about Ubuntu. I've tried Googling for the problem, but didn't find anything useful. Which version of Java are you running? How did you install it? You might try installing Java from Sun.

I installed java with very common way in Ubuntu (Debian) world, like this :

sudo apt-get install j2re1.4 j2sdk1.4

Just like the tutorial says here :

I'll try again much later with Knoppix 5.01. It's more stable than 6.10 Edgey


You might also try an Ubuntu forum, especially if java doesn't run at all.