If you did, install it again - you should know how to do that if you knew how to uninstall it.
On a Mac, it's pretty easy because you'll already have it installed unless you uninstalled it.For most things, you'll be doing with the SDK, both Open Java and Sun Java from Oracle (yes, that Oracle) will work. You'll need a working version of Java to run the SDK components.