Update:
I have succeeded in making my installer work properly. ( added the release notes, license agreement section, choosing the location where the program is to be installed, having it generate me an destop shortcup etc.) what i want to add it, that during the instalation, I want the user to choose the path to where he has installed his JDK. I want to take this path, create a system environment variable with the name JAVA_HOME and have it's value be this chosen path. How do i do this? It is kind off diifficult to show my code because i am on my phone. But if i have to i will make an effort to do so.