How do setClasspath on java?

System.setProperty("java.class.path","");this line i used.but not setting the System Environment Variables (User variables).plz tell Steps
[159 byte] By [rajeshnr@mailb0x.coma] at [2007-10-1 20:17:51]
# 1
View the Installation Instructions for the Java version you have; follow the instructions for setting the PATH, just set the CLASSPATH instead of the PATH variable.
ChuckBinga at 2007-7-13 2:19:04 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

String cp = System.getProperty("java.class.path");

cp=cp.replace(";.;","");

System.out.println("Before >>>>>>>>>>>>>>>>"+cp);

String newcp = cp + System.getProperty("path.separator") + "C:/user/igst/client/log4j.jar;.;";

System.setProperty("java.class.path", newcp);

System.out.println("After>>>>>>>>>>>>>>>>"+System.getProperty("java.class.path"));

this Code for i used but the Run time Error the

Exception in thread "Thread-2" java.lang.NoClassDefFoundError: org/apache/log4j/Layout

rajeshnr@mailb0x.coma at 2007-7-13 2:19:04 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...