While your programs are being installed the package is unpacked on your harddrive (at some different drve ,mostly last one, example if you are having c,d,e as drives then it will be extracted in e) first and then it is copied to installation location(program files). Many times this folders are deleted automatically but in some cases the nremain on your disk. You can safely delete that folder.
If after deleting that folder, problem is created then try to reinstall that software and by the way, this folders do not interfare with any other programs hence then will not cause problem with java. It looks that you might need to reinstall java.