I managed to create a <filename>.bat file using a jar creator . It also
creates <filename>.jar file

but when i click .bat file it says unsupportedClassVersionError: bad version number in .class file

.jar file says could not find the main class...

how can I overcome this???

By making sure the right versions of java and javac are in your PATH (not CLASSPATH), or call the proper version explicitly.