Make JAVA_HOME variable point to a jdk installation, not jre.
You are referencing the runtime environment, not the development kit – it can’t find the compiler because its not there.
From the line you posted, which states you have open-jdk you can just remove the jre at end:
export JAVA_HOME='/usr/lib/jvm/java-6-openjdk/'