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

Answer: 
From the command line, run

```
javac ClassName.java

```
As the others stated : it's by compiling. You can use the javac command, but I'f you're new at java, I suggest you use a software for compiling your code (and IDE) such as [Eclipse](http://www.eclipse.org) and it will do the job for you.