If you want to use java and openmpi, try putting these paths into your ~/.cshrc:
setenv LD_LIBRARY_PATH /usr/local/lib/openmpi/bin
setenv PATH ${PATH}:/usr/local/lib/openmpi/bin
Use mpijavac for compilation and mpirun -np <#procs> java <name_of_class_file>
Also note: if you're having PATH related problems, you can try these paths no matter what language you're using.