If you don't have the JDK
Or if you have an older version that does not work with the most recent BlueJ release Notice that, according to the information on the BlueJ downloads page, MacOS X users will not need to install the JDK.
The JDK can be installed from [this location] click the link near the top of the page:
Select the Operating System you are using from the drop-down list, continue, agree and download the file. Read the installation instructions for your operating system and install the software.