This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 (javajee 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.