NetBeans, Eclipse, and the like are not compilers. They are IDEs--Integrated Development Environments. They include a compiler, or invoke an external one.
And as you're just getting started, you correct in thinking that you shouldn't use an
IDE. You're better off with a simple text editor or programmer's editor like UltraEdit or maybe Notepad++ (?) or something, and compiling and running from the command line.
Google for something like
text editor for java or
programmer's editor for java and
you should see some you can try out.