Redhat linux 9 is having a java compiler gcj (GNU compiler for java). u can get more about it from man pages and http://gcc.gnu.org/java/.
Or u can downlaod j2sdk for linux as rpm from sun.java.com (i am using this.)
ucan set the env variables by editing /etc/profile
export PATH ..........