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

Answer: 
A `.java` file is the code file. 
A `.class` file is the compiled file.

It's not exactly "conversion" - it's compilation. Suppose your file was called "herb.java", you would write (in the command prompt): 

```
 javac herb.java

```

It will create a herb.class file in the current folder.

It is "executable" only if it contains a `static void main(String[])` method inside it. If it does, you can execute it by running (again, command prompt:)

```
 java herb

```
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
```