How can I convert a .class file of java to .exe file
how about ... not?
why would you want to do that? one of the major upsides of Java is that it's platform independent, if you create an exe, you'll limit it to the Windows platform.
just create a .jar file, that is just as well an executable, which keeps the platform independency intact.
if you still would want to create a .exe, there are enough tools that can transform your .jar files into .exe files, just google for it.