Thanks Jaikiran and Lucas.
So I need to do something like this:
Exception in
thread "main" javax.naming.NoInitialContextException: I get this: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
It seems that I need to start JBoss with the -b option. But I'm using Eclipse and I don't know to this in Eclipse.