I am using Sun Glassfish Enterprise Server 9.1. How can I compile EJB 2.0 programs without using any IDE?
Just the usual way with JDK. You at least need to take Glassfish' libraries in the -cp argument.
-cp
You should consider using Ant or Maven