Eclipse isn't a java compiler. It's a Java Editor.
For a Java Editor I recommend crimson editor (though most will say Eclipse)
For a java compiler use this in a .bat file
@echo off
Title Magestickown's Perfect Compiler
color 0a
cls
echo If you have problems while compile make sure it has your java version..
echo Change "jdk1.6.0_18" with current version
echo What would you like to do?
:option
set /p userinp=Choose 1 to compile or 2 to Exit:
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto compile
if "%userinp%"=="2" goto exit
echo Invalid Command!
pause
goto option
:compile
"%SystemDrive%\Program Files\Java\jdk1.6.0_18\bin\javac.exe" *.java
echo Sucessful compile! What would you like to do?
set /p userinp=Choose 1 to compile again or 2 to Exit:
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto compile
if "%userinp%"=="2" goto exit
:exit
exit
replace
"Java\jdk1.6.0_18\" with your version. For example, if I had version 16 i would replace "java\jdk1.6.0_18\" with "java\jdk1.6.0_16\"