How to configure java in environment variables

Hi,
I set it to JAVA_HOME under System Variables and the path to C:Program FilesJavajre6
I am having an issue setting the JAVA_HOME Environment Variable within Windows XP.
Yet it doesn't seem to have detected.
Would be great if someone helps.
Thanks.
