For Eclipse:
Added this two lines in eclipse.ini
Second line represents the JDK location of the javaw.exe file.
-vm
C:\Program Files\Java\jdk1.7.0_60\bin\javaw.exe
Note: place -vm lines before -vmargs, otherwise default location is taken.
For STS
Change the same as above in STS.ini