I know that professional developers use IDEs like netbeans and eclipse. But do they ever have to use good old javac ? Does it offer any advantage over an IDE ?
Has anyone been in a situation where they had to do a job without an IDE ?
In all projects I'm involved in I require a non-IDE way to build it, typically using Ant. That's actually a fairly common (and quite sensible, IMO) requirement. I don't much care what tools the developers use -there's a lot of personal preference in that- as long as an Ant build is available.
In many projects that I've worked on we've used continuous integration. That means we would have a build server somewhere running software such as Jenkins (formerly known as Hudson). What it does is automatically check out the source code of the project whenever somebody checks in a change in the version control system, and then automatically build it and run unit tests. If something is wrong, the developers get an e-mail that lists the errors that happened while running the unit tests.
In addition to this, the build server creates a build every night (a nightly build) with a build number that the testers use for testing. When they find a bug, they report the build number of the nightly build, so that the developers know exactly in which version the bug was found.
Building using an IDE is only meant for developers, and to be able to debug the code easily. "Official" builds are always done via a build system such as described above.
An IDE helps a lot with productivity, for example it notices immediately when you make a typo in a class, method or variable name, it helps you with code completion etc., so for professional software development an IDE is really a must.
Also... It still amazes me how many really competent Java programmers can be rendered useless, by putting them on-site to work on an issue on a server. Most servers are headless, so no GUI, and no IDE. Heck, even if it wasn't a server, it's a client site -- you don't control what IDE a client uses, so you better know the lowest common denominator (using the command line).