i found this that allows all versions of java to be uninstalled before you patch to the latest version using patch management
wmic product where "name like 'Java%%'" call uninstall /nointeractive
i found this that allows all versions of java to be uninstalled before you patch to the latest version using patch management
wmic product where "name like 'Java%%'" call uninstall /nointeractive