This is an understatement, reading some of the antitrust documents you can clearly see that Microsoft was afraid that Java's ability to create rich programs that run regardless of OS would end up making Windows unnecessary since it wouldn't matter what OS you had. They saw Netscape as a distribution vector for Java and the JVM and was an important reason for why they made IE (one could say "and ActiveX" but that was already a thing they had anyway).
And FWIW i think they were partially successful in that their own MS Java did kill Java on the desktop and browser (the startup performance of Sun's runtime was also a factor, but the main thing i always remember developers being concerned around the turn of the millennium was compatibility with the VM that everyone had - the MS Java - both in terms of supported APIs and in terms of runtime performance - MS Java was way slower and contributed extensively to the idea of Java being slow).
Of course they failed to avoid making Windows unnecessary for a large number of applications, but instead of Java it was HTML, CSS and JavaScript. If that is a better alternative... well, i'm sure there are people who prefer it this way.