If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

When you are setting the classpath using the setproperty, you have to give the property and the value. When giving the value, \ should be escape character, so when setting the classpath to E:\raja doesn't give the correct classpath, But you have to give E:\\raja.

My point is that just displaying some paths might NOT mean that the JVM's classpath has been changed.
You need to demonstrate the the JVM's classpath has been changed. I thought that the getResource() method used the classpath to find resources. My code showed that a file on the classpath was found and that one NOT on the classpath was NOT found.

I thought that was the point of the original question. Changing the contents of a string doesn't solve the problem of how to change the classpath to be able to access resources/class files.

Well the solution gulpala that you are suggesting does'nt really work. Its displaying the modified classpath but when you try to access the class using Class.forname you would get NoClassDefFoundError.