Uh, just install Java 8. It will install alongside of previous versions; essentially like another program. And then, when you install it, or it updates or whatever, it may ask you to remove older versions of Java. Just say no. I would, however, keep a way to reinstall the old version of Java on hand, just in case it gets removed without you realizing it.
On another note, what Minecraft mod is it? I might be able to update it myself or find an updated version/alternative.