OpenOffice.org encountered a problem for Java Runtime Environment

Hi guys,
My OpenOffice.org encountered a problem for Java Runtime Environment (JRE). It indicates that the JRE is defective. Look at the message. It says “OpenOffice.org requires a java runtime environment (JRE) to perform this task. The selected JRE is defected. Please select another version or install a new JRE and select it under Tools – Option – OpenOffice.org – Java”.

Please help me to fix the problem.
