Quoting Wikipedia: Although there are similarities between JavaScript and Java, including language name, syntax, and respective standard libraries, the two languages are distinct and differ greatly in design.
Pragmatically, JavaScript and Java are quite different.
Most JavaScript implementations are now technically supporting the ECMAScript standard, but... adoption of that nomenclature has been slow.
Apple supports JavaScript (ECMAScript) on Apple products.
Oracle supports Oracle Java for Oracle operating systems, and also on selected other platforms.
Apple does not offer nor support Oracle Java.
Microsoft Silverlight and Adobe Shockwave were retired by their respective vendors, and Adobe Flash follows later this year.
Adobe Flash hasn’t been needed for YouTube and other streaming-content services in quite some time.
Very few websites—outside of a business and its own internal-use apps—uses client Java. I haven’t encountered a website with a generally-accessible Java client dependency in most of a decade. Java can be needed for some integrated development environments (IDEs), and for some business-specific apps. A Java client is not needed for general web browsing.
There will certainly still be some pockets of Silverlight, Shockwave, and Flash usage, but the rest of the world has moved on. Keeping the retired apps around and active can leave a user vulnerable if some exploit is found, too.
Or as was mentioned earlier... Remove Java. See what breaks.