Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
maxLevel3

This page assumes that the reader has successfully followed Installing and Running ONOS.

IDE Setup

The project does not enforce the use of a specific IDE, but rather, a set of guidelines that can be configured in an IDE. As such, developers should consult the documentation for the IDE of choice for specific configuration steps. 

...

Tip
titlegit-review + Mac

If you're using a Mac, you may need to manually upgrade the git-review package dependency. (git-review bug#1337701)

$ sudo pip install --upgrade setuptools
$ sudo pip install --upgrade git-review

Java and Maven

Build failures may occur if multiple Java versions are installed, and Maven is pointed to the incorrect version i.e. if there is a mismatch in Java versions reported by commands  mvn --version and java -version.

Tip

The best way to prevent this version mismatch is to install Maven before Java 8.

Upgrading to Java 8

For OS X, the latest Oracle Java 8 SDK can be downloaded from Oracle. 

For Ubuntu, the following steps will upgrade the installation to Java 8:

Code Block
languagetext
$ sudo add-apt-repository ppa:webupd8team/java -y
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer oracle-java8-set-default -y

You will have to accept the Oracle binary license terms

 

Setting JAVA_HOME 

If not set automatically during the Java 8 installation process, The JAVA_HOME environment variable should be set to the JRE installation location for Java 8. The process for verifying/setting the proper version varies with platform.

On OS X

The current JAVA_HOME may be verified with:

Code Block
languagetext
$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home

To set the version, either run or add the following to the shell profile:

Code Block
languagetext
$ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)

On Ubuntu

To verify the JAVA_HOME:

Code Block
languagetext
$ env | grep JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-8-oracle

If JAVA_HOME is not set or incorrect, either run or add the following to the shell profile:

Code Block
languagetext
$ export JAVA_HOME=/usr/lib/jvm/java-8-oracle

Building API Docs

To build a local set of the ONOS Java API documentation bundle, use the onos-build-docs utility, which uses Maven to generate both internal and external documentation. 

...