I am getting noclassdeffounderror after deploying the jar with changes
to a certain class file.
This is caused when there is a class file that your code depends on, and it is present at compile time but not found at runtime (see this answer).
While deploying i Just dragged the .class file from the eclipse work
space into a pre existing jar file. does that matter?
Yes, it matters. Be sure to put the class file back in the correct package folder. For example, a class in package com.foo
must be in the folder com/foo
inside the jar file. It's possible your altered version landed somewhere else when you dragged it into the jar file.
Does the jdk version in which the jar file is compiled matter because
i am running on jre 1.7 in eclipse but my deployment environment is of
jre 1.6 ?
The jar file itself is just a zip file, so no, it doesn't matter which version of Java you were using to compress the contents of the jar file.
However, if you've re-compiled a single class from an existing jar file, it does matter which version of Java was used to compile the other classes in the jar file, because you could cause the class to be incompatible with its companion classes.