Minecraft online won't work?

So I want to play Minecraft online, and it told me I needed Java to play so i downloaded Java but now it's telling me that the deployment rule set won't allow it to run. How can I change this? I really want to play.

Did you download the right version of Java? You're supposed to download JRE. Here, http://javadl.sun.com/webapps/download/AutoDL?BundleId=90223

That isn't the real java website that Shawn listed. The real website is Java.com, not javadl.sun.com (Prabably a virus or malware, do NOT download it) -.-. Try reinstalling minecraft/Java, and if the problem persists then contact Mojang.