Start the Eclipse IDE.
Select Window > Open Perspective > Other... from the Eclipse menu.
Select JBoss AS perspective and click the OK button:

In the JBoss Server View, right click and select New > Server context menu:

In the New Server dialog, select JBoss Inc > JBoss AS 4.0 server type and click the Next button.
NOTE: Do NOT select JBoss > JBoss v4.0 server type.

In the Create a new JBoss Server Runtime dialog, enter:
Name (unique identifier): JBoss 4 EJB 3.0 Runtime
Home Directory: C:\jboss4
Click the Next button.

In the Create a new JBoss Server dialog, enter:
Name (unique identifier): JBoss 4 EJB 3.0 Server
Click the Finish button.

New server will be created:

OPTIONALLY: Try to start and stop new server using toolbar buttons:

|
|
|
|
Hosting provided by PerfoHost: KVM VPS. Unix VPS. Windows VPS. VPN. Domains. Dedicated servers. Colocation.