you could install virtualbox and then put Windows (if you want to pay for it) or a linux distro for free. What is the course compatible with? I'm pretty sure you can write java code on a mac too though, so I'm not sure why you wouldn't be able to for your class.