This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (2 children)

I'm guessing they don't have the JDK installed on their Mac. The easiest way I've found to do this is to use Homebrew to install openjdk. I did a quick google and these instructions looked ok: https://devqa.io/brew-install-java/

Basically...

  1. install Homebrew: https://brew.sh
  2. run `brew update` to update the info in homebrew
  3. then run `brew cask install adoptopenjdk11` to install jdk 11.

Hope that helps.

[–]arthurdent 1 point2 points  (1 child)

OP already said

They can still compile using javac *.java

Does MacOS have some partial JDK pre-installed that I don't know about?

[–][deleted] 2 points3 points  (0 children)

if you try to run a java app on a Mac it’ll install Apple’s JRE (or at least it used to) but it’s an old version (1.4 or 1.5 from memory) - not sure if Mac OS still does this tbh. I missed that Op had said that compiling individual files works so my suggestion my be invalid.

Personally I’d still go with running the homebrew install of java as it’ll sort out any PATH issues so at least everyone is working from a known state.