I've Just created a minecraft 1.11.2 server(the official download from minecraft.net), and set it up. I can join it from my computer using localhost. However, no other computers can connect to it(they get the message:"can't connect to server". I can't connect to it using the ip either. I am running OX Yosemite and have no firewall on. Also, I've made sure to whitelist the other computer(which is not on the same LAN network). Does anyone know how to fix this?
Sounds like you have not port-forwarded your router.
This guide is for a much older version of Minecraft, but the port-forwarding portion is still good. Follow the guide thoroughly.
If you're in a situation where you're unable to port-forward (living on a University Campus, or otherwise unable to access the router configuration), you can look into a Virtual Private Network program, such as Hamachi.
Be warned that Hamachi modifies your network adapter to work, meaning you'll need some networking know-how to fix things if something breaks.