Are you trying to execute a java file in Moxilla? or are you trying to get Moxilla ro cecognize the Java in a page that you created and execute it? If the latter, then just download the JRE (Java Runtime Environment) from Sun Microsystems and install it, then copy the plugin that is unpacked during installation into the plugin directory for Mozilla and voila. I think that should do it.
If the former, then you will have to create an html document using the <applet> </applet> tags and execute it in Mozilla after making sure that the JRE plugins are installed as above. There is a great tutorial on java at
http://java.sun.com/docs/books/tutorial
I hope that I am accurate and that it helps you.
Brgds,
et2mkc