Try running this and see if it works "C:\Program Files\Java\jdk1.8.0_121\bin\java -jar fmw_12.2.1.2.0_wls_quick.jar" (including the quotes).
– n8teMar 2 '17 at 11:56

@n8te Yeap, so easy, you are right. So how to avoid this ? Do I have to make any adjustments ? Change the JRE_HOME or something ?
– giannis christofakisMar 2 '17 at 12:03

It's unclear to me without being able to see some of your other settings why it is trying to run the install from the jre directory instead of the the jdk one. Maybe jre is listed in your %PATH% and that is superseding the JRE_HOME? Just a guess.
– n8teMar 2 '17 at 12:05

Environment variables don't propagate changes instantly, they are set once when a process is started and don't change anymore unless the process itself does it.

If you have opened that cmd window before setting new JAVA_HOME, then it's probably still using the old value. You can check that by running echo %JAVA_HOME% in that cmd.

If you want to quickly ensure that all env variables are up to date across the system, then just log out from Windows and then log in again. The quicker way would be to run set JAVA_HOME=<valid_path_here> in that cmd, but it will update it only there and in programs started from that cmd.