You compile your classes in the usual way. However most EJB servers also require additional classes to be created and compiled to complete the bean. For example, WebLogic has a utility named "ejbc". You'll have to check the docs for your particular platform.
An IDE is no substitute for an Intelligent Developer.