I did not update the environment variable, but I think the path should be in the JRE, which is inside the JDK, as I tried this, and it worked
D:\Basit>ogs-3.1.2-windows.exe -j "c:\Program Files\Java\jdk1.7.0_05\jre" .
Hope this answer helps others as well.
Basit source share