The Meaning of Life, the Universe, and Everything.
When I first upgraded to OSX Yosemite I was having trouble using Minecraft because Java 7 is no longer supported and when I tried to launch the Minecraft app, OSX was asking me to install Java 6. For a quick fix, you could just downgrade to Java 6, but if you're like me and you want to have the latest version of Java, follow these steps.
Make sure all versions of Java are uninstalled on your computer. First, navigate to your hard drive and open the "Library" folder. Inside that folder, find the "Internet Plug-Ins" folder and inside there is a file name JavaAppletPlugin.plugin. Delete it.You will also need to navigate to the "Java" folder (also in the "Library" directory) and inside should be a folder called "JavaVirtualMachines". Delete everything inside the "JavaVirtualMachines" folder.
Now that we have Java 8 installed, we can move on to getting Minecraft to work. At the moment, OSX will not let you open the Minecraft app you normally use on your Mac unless you're using Java 6, but there is an easy workaround. Go to http://www.minecraft.net/download and click on "Show all platforms". Under "Minecraft for Linux / Other" click on "Minecraft.jar (86 KB)" and it will download.
Now you can move the Minecraft.jar file anywhere you want to. Just double-click on it like you would have opened the Minecraft app before upgrading to Yosemite and it will open the Minecraft launcher. Everything should work just as it did before and you will still have all of your Minecraft profiles, saves, resource packs, etc. I hope this tutorial helps!
The universalJavaApplicationStub is a bash script that can be dropped in instead of the JavaApplicationStub that Minecraft ships with. You need to make a one additional modification to the Info.plist so that the universalJavaApplicationStub will be invoked and to make it compatible with both Oracle and Apple Java (e.g. Java -> JavaX). Once modified, the Minecraft application can be dropped into any Mac and will work with whatever version of Java is installed.