Problem solved:
Instead of copying the "C:\Program Files\Java\jre\bin\server", copy all the files present in the C:\Program Files (x86)\Java\jre1.6.0\bin\client
And then make a new folder "server" inside the C:\Program Files (x86)\Java\jre1.6.0\bin\
and then paste all the copied files..
So we have a folder "C:\Program Files (x86)\Java\jre1.6.0\bin\server" with files same as "C:\Program Files (x86)\Java\jre1.6.0\bin\client".
This makes the JBoss AS 7.1.1 Final runs inside the Eclipse.