How to run a java program in Mainframe?

Why not? java is a platform independent. so it should work in mainframe. but procedure is little bit diffrent

Up to a certain release of z/OS , Java must be installed by your site support group; later releases of z/OS include Java as part of the system install.

The easiest way to run Java is to go into OMVS and type in  java  although it is possible to run java through batch.