I have an Android Project called Hello on my Ubuntu 10.04 i386 Server (headless). It contains all things an Android project folder should have. I first build the project in
As Edwin Buck stated, check your $PATH for softlinks to /etc/alternatives/java in the /usr/bin/ directory. They are being read before your appended JAVA_HOME variable.
That was my problem:
ls -al /usr/bin/j*
lrwxrwxrwx 1 root root 22 2012-05-07 13:26 /usr/bin/java -> /etc/alternatives/java
lrwxrwxrwx 1 root root 25 2011-05-12 19:45 /usr/bin/java_vm -> /etc/alternatives/java_vm
lrwxrwxrwx 1 root root 24 2011-05-01 05:22 /usr/bin/javaws -> /etc/alternatives/javaws
lrwxrwxrwx 1 root root 26 2011-05-12 19:45 /usr/bin/jcontrol -> /etc/alternatives/jcontrol
lrwxrwxrwx 1 root root 23 2011-04-26 02:24 /usr/bin/jexec -> /etc/alternatives/jexec