I have the exact same problem!
If someone could help!
Then environment variable JAVA_HOME does not point to the j2sdk or the JBoss instance is launched using another JRE. Ensure that the IDE settings are such that only the J2SDK's JRE is being used.
Check under Window->Preferences->Java->Installed JRE's and ensure only the j2sdk's one is listed. Also check under Project->Preferences->Java Build Path->Libraries that only the J2SDK is listed.
Hope it helps.
Thanks for that mate. Appreciate it. Worked like a treat. The only thing is, I was trying and trying and NOTHING, but once I deleted the old configuration and added a new one, then it was sweet as..
Thanks for the help buddy.
As stated in the error message itself we have to do
Just go to the installed JRE and select the added jre and edit in that mention only the jdk home path which is installed in your machine
& not to its JRE & select ok then come to previous menu
now the error message will disseaper