Shell script with Java code in Cron

Dear All,

I have a shell script which has JAVA code inside it runs perfectly on command line. But while I set it on cron, all rest of the script runs but Java code doesnt.

java -cp "lib/common-client.jar:lib/commons-beanutils-1.7.0.jar:lib/commons-betwixt-0.8.jar:lib/commons-collections-3.1.jar:lib/commons-collections-
3.2.jar:lib/commons-configuration-1.2.jar:lib/commons-dbcp-1.2.1.jar:lib/commons-dbcp-1.2.2.jar:lib/commons-digester-1.7.jar:lib/commons-io-1.2.jar:
lib/commons-io-1.3.1.jar:lib/commons-lang-2.1.jar:lib/commons-lang-2.2.jar:lib/commons-logging-1.0.4.jar:lib/commons-logging-1.1.jar:lib/commons-log
ging-adapters-1.1.jar:lib/commons-logging-api-1.1.jar:lib/commons-net-1.4.0.jar:lib/commons-pool-1.2.jar:lib/jconn3.jar:PDL.jar:." com.local.myPDWriter

Can you please help me out if I need to set JAVA path or any other file while setting up on cron ?

Set the environment properly in the shell script ( e.g. path to java... etc...) at the beginning and it will work

I have csh as default shell and writting a bash script. When I run the script from command like (csh), its running file.
But not from cron.

Can I source .csh in bash script ?

If you use csh as default shell why not write your script so it uses csh and then at the beginning of your script you dont forget to add the source instruction...