problem in setting classpath in shell script

please send me format for wriiting classpath in shell script
this is my shell script

---------------
#! /bin/bash

javac File1.java

/usr/bin/java File1
--------------------------

the script works fine on termianal but in cron it gives me error saying class defination not found

how to set the path please send me syntax

There is difference when you run your script from cron and from terminal,cron does not get env variables ,so either you can set it at thje start of cron like

or you can use full path

And one more imp thing to note is always redirect output to file while running through cron