Well, if you're so desperate to find a solution but on the other hand question suggestion made by people who deal on a daily basis with such problems, then I'm not surprised that the problem continous.
Sometimes that Java installation gets from some reason corrupted. The link I've included for Java is the place where you can download the offline installer.
Since both programs have problems, it is to assume that the problem is connected to something on your system. By ruling out possible causes, we will be able to narrow the search for the problem.
However, I stand to my advice given in my first post and reckon you trying all the suggestions made there. Another option would be to search this forum for similar problems to see what other Mods. have advised. You will see that they make/ made the same suggestions.