Don't download and install it.
Leave Java disabled in your browser.
Don't blindly enter your admin password when a dialog mysteriously pops up on your screen asking for it.
Don't frequent places that are known to distribute it, like torrents.
Don't install "codecs" or "plug-ins" that a website says you need to view its content. If it seems valid, go to the plug-in developer's website and download from there.