cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
769
Views
0
Helpful
0
Replies

Java version incompatibilites - Oracle Java version 12, and source version 6

snovello
Cisco Employee
Cisco Employee

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$

 

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: