I installed the Java 6 JRE on my VPS just fine, but I can\'t get the EE SDK installation to even run.
root@vps [/usr/java]# java -version
java version \"1.6.
Quick and dirty solution for me:
sudo apt-get install jarwrapper fastjar
Then just run your .sh script and voila!
In my case, I had jdk1.6.0_16 extracted in my home directory and had a symbolic links to java and /javac in /bin. Then I encountered the error described above in the question.
However once I included a symbolic link to jar in /bin, the shell script to install Java EE ran as expected.