Question: Can anyone tell me how I can convert a .java file into .class file with an executable bytecode?

Answer: 
To get a .class file you have to compile the .java file.

The command for this is javac. The manual for this is found [here (Windows)](http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html)

In short:

```
javac File.java
```
You can not compile any java file to class directly.
It should have main method to compile it in class file