If you don't wan't to use IDEs, then, rather than using just javac, you should look to use command-line tools like Ant or Maven. Note that, these tools are independent of IDEs.
The IDEs include them as a convenience for us.
If you want to use only javac, sure, no problem. You need to set the classpath that includes the necessary libraries (java jee jars in this case) which are needed at compile time. You can then use the jar command to create the war/ear and then manually copy them to the specified folder in the server for deployment.
SCJP 1.4, OCMJEA/SCEA 5.0.
Joined: Dec 11, 2012
Start using maven. Sooner or later you 'll come to that, and without detrimental effects to undestand the whole process(eg IDE)