Mac shortcuts — For New Java Developers
When I switched from windows to mac, I struggled a lot for starting few days with Java installations, where are the libs going? What are all the Java versions installed on my machine etc. It is an overall big shift in mentality, when you switch operating systems specially when you move between windows based to unix/linux based systems. Below are few useful commands which I found very useful for my initial days.
Get Rituraj Jain’s stories in your inbox
Join Medium for free to get updates from this writer.
How to check location of recent Java installation, Or checking java_home?
/usr/libexec/java_homeIf you use a flag -V (UPPERCASE), it will give you location of all Java installations
/usr/libexec/java_home -VHow to check installation location of specific version?
/usr/libexec/java_home -v 1.8
/usr/libexec/java_home -v 16
/usr/libexec/java_home -v 17




