This error occurs when the classes in the jar file does not follow the same structure as of the folder structure of the jar..
e.g. if you class file has package com.test.exam and the classes.jar created out of this class file has structure test.exam... error will be thrown. You need to correct the package structure of your classes.jar and then include it in ecplipse build path...