You have to create a start scritp for Jboss.
/home/jboss/jboss-4.0.4.GA/bin/run.bat -b 0.0.0.0.0 -c test1 > test1.log
-b 0.0.0.0.0: makes jboss listening on every address
nohup /home/jboss/jboss-4.0.4.GA/bin/run.bat -b your-ip -c test1 > test1.log
-b your-ip : makes jboss listening only on the given ip- address
But i am not running jboss from CMD. I am running it from services.msc.
How do i run it with ip address in that case?
JavaService, from ObjectWeb, stores startup information in the registry at (where XXX is the service name):
Change/add registry entries there as follows:
Start Param Count REG_WORD 0x000000002 (2) Start Param Number 0 REG_SZ -b Start Param Number 1 REG_SZ 0.0.0.0
For details, see the docs at http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/javaservice/javaservice%201.2/docs/description.html?rev=1.6
Have you see the problems with using JavaService mentioned at http://wiki.jboss.org/wiki/RunJBossAsAServiceOnWindows?