re-install your Java but using the standalone installer. You can find a link here:
icon bouncing in Dock (click on link)
If it says already have that version of Java & won't let you install it, then go to Library>Receipts folder & delete Java142Update2.pkg (easiest to find if you put it into list view.)