The error message tells you that the class version is different. In other words, the Java compiler you used in Eclipse is newer than the Java runtime you use in the command prompt. You should check which Java version you want then use only this version. To change the version you use in the command prompt you must change the path
environment variable to contain the path to the desired version. In Eclipse you can select the used version in the settings.