Problem - Recently after installing java 8 on my machine, i was not able to run Talend Open Studio 5.6.1 which was complaining that java 8 is not supported. I had java 7 too on my machine, but talend open studio was by default pointing to java in my path.
Solution - (if you were not able to change default java in your system to java 7) - We can configure talend open studio to use an specific java installation. In my case i wanted to configure talend open studio 5.6.1 to use java 7.
All you have to change is the corresponding *.ini file for your talend executable.
I am using windows 8 so in my case it was TOS_DI-win-x86_64.ini
add a new entry to this file as below (-vm...). It already has other entries.
this new vm entry will control the location of java which talend will use. enter the -vm parmeter and path to your java 7 installation. In my case it was c:\program files\java\jre7\bin
-vmargs
-vm C:\Program Files\Java\jre7\bin
-Xms512m
-Xmx1536m
-XX:MaxPermSize=512m
-Dfile.encoding=UTF-8
save the file TOS_DI-win-x86_64.ini and restart talend studio.
Once studio is opened you can also control this behaviour via menu option Windows-->preferences-->java