Is it safe to install previous or older versions of Java?
Oracle highly discourages users from using older versions of Java. Installing old and supported versions of Java on your system presents a serious security risk. Upgrading to the latest version of Java ensures that Java applications will run with the most up-to-date security and performance improvements on your system. You can confirm that you have the latest version on the verification page. If installing an older version of Java is absolutely required, you must first uninstall the current version. See the instructions on the Mac uninstall Java FAQ.