You can write java programs using any text editor you like - I use emacs on linux systems and wordpad on Windows myself Just tell it to save the source code as a .java file when you need to save so it doesn't save a a .txt file or something. And make sure you save as plain text too

Command line is the DOS interface in Windows (convenient started by running "command" or "cmd" from the run box depending on Windows version), or the regular of shell or terminal in linux.