I thought I posted this topic, but maybe not, because I can't find it, so I'll ask it again just in case. my apologies if it's still here somewhere.
I downloaded and installed Java 18 on my 11,6 iMac, 2010, quad core i7running el capitan. I have a backlight issue, so I got an external monitor after a few years, and luckily I can still use the machine.
However, when I entered java -version in the terminal, it says the default version is java 8. I looked in the Library directory (/Library/Java/Java Virtual Machines) and sure enough the folder for Java 18 is there, but for some reason it isn't being 'seen' or chosen as the default java version. in the past when I've installed java (like on my MB Pro just recently) in updated find and Java 18 is the default version.
I'm having to read up again on Unix, but I can't figure out where the necessary file/command -- whatever it is -- that determines the default Java version is. it has to be somewhere, given the above statement.
Has anyone else had this problem, and can they offer any advice on how to fix this? I simply want to make Java 18 the default version.