The default Java version we get via brew (on Mac) is now Oracle version 12. This is no longer compatible with the java language version 6. And when you compile an NSO package you will see errors like:
[javac] error: Source option 6 is no longer supported. Use 7 or later.
This happens even for packages without java, because when ncsc compies the yang files, it generates some java classes so that you can have Java APIs.
A workaround for this is to edit the file in the distribution that sets the default Java language. Here is the edited version (where I replaced 1.6 with 1.7 on both lines.
SNOVELLO-M-J0VB:demo snovello$ cat ~/NSO/v5.1.0.1/etc/ncs/java.properties
ncs_java_source_ver=1.7
ncs_java_target_ver=1.7
SNOVELLO-M-J0VB:demo snovello$