Open my computer >> tools >> folder options >> view >> and uncheck the "Hide extension for known file types "
then apply ok.
now go to were your .java file were located in , then make new text file , and type following inside of that.
javac Helloworld.java
java Helloworld
pause.
"Helloworld" - this will be any name its up to your program name.
now save it and , rename the .txt to .bat file , the file can hold any name .
additional - :
when your program runs with bat file you can change the title , color of the cmd.
by put this codes like this.
title Helloworld
color A
javac Helloworld.java
java Helloworld
pause.
thats it .
you can use , @echo off command to hide commands .
like this.
@echo off
title Helloworld
color A
javac Helloworld.java
java Helloworld
pause.
ok :)