Follow these simple steps to allow applications downloaded from anywhere to run on your OS X Mac:
Open System Preferences and then choose Security & Privacy
Choose the first tab: “General”:
The bottom section may be grayed out:
If so choose the “Lock Icon” in the bottom left:
Under “Allow Applications Downloaded From” click the button to set it as “Anywhere” instead of “Mac App Store” or “Mac App Store and Identified Developers”
Now try running your application and see if it works.