I am creating an application where I need java jdk to be installed.
So I want to create a detection function for jdk in system and if not found then install it by the setup which i will provide and also store it Environment Variables -> System variables as JAVA_HOME
C:\Program Files\Java\jdk1.x.y.z
by default.
I searched through lot but not getting exact idea how will I achieve this.