I tried this on two separate system and get the same error %./java ./java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory %pwd /usr/local/linux-sun-jdk1.6.0/jre/bin I build this using port and received no error at all during make install