You could always add the setting for JAVA_HOME into the .bat or .sh script that start JBoss AS.
You could also create another .bat or .sh that first sets JAVA_HOME and then calls the JBoss AS .bat or .sh.
I could be a little more specific if I knew which version of JBoss AS you were using and it I knew how you were starting it (from command line or as a service, and if as a service what mechanism you were using to run it as a service - there are several and each is configured differently).
You have a couple of choices. You can set JAVA_HOME in either service.bat or in standalone.bat. Since the instructionms already have you editng service.bat, that might be the best place to put it.