You use Windows? Try: Start >> Settings >> Control Panel >> System >> Advanced >> Environment Variables >> look vor variable "Path" than edit it and add a path to your Java bin directory (ex. C:\j2sdk1.4.2_08\bin).
After that check it if you have configured it correctly. Just go to start >> run >> type 'cmd' without quote than type 'java -version'.