Manually install and troubleshoot Java on Wowza Streaming Engine

Wowza Streaming Engine™ media server software is a powerful Java server. When you install Wowza Streaming Engine 4.2.0 and later, the software automatically installs the required server version of Java that it needs, making it easy to get up and running. For optimal performance and stability, we recommend using the version of Java that installs by default with Wowza Streaming Engine. However, if you can't or don't want to use the version of Java that installs with Wowza Streaming Engine and you don't use Wowza Streaming Engine Manager, you can manually install use a different version of Java.

Important: Wowza Streaming Engine Manager requires the version of Java that installs with Wowza Streaming Engine. Do not install and use any other version of Java if you work in Wowza Streaming Engine Manager.

About Wowza Streaming Engine and Java


When you install Wowza Streaming Engine 4.2.0 or later, Wowza Streaming Engine installs the server version of Java 8 that it requires.

If you can’t or don’t want to use the version of Java that installs with Wowza Streaming Engine and you don't use Wowza Streaming Engine Manager, you can install and use a server edition of Java 8 Update 91 (8u91) or later. Earlier versions of Java are not supported.

For optimal performance and to use Transcoder, you must deploy Wowza Streaming Engine on a 64-bit operating system with the a 64-bit version of Java.

Note: Wowza Streaming Engine 4.1.2 and earlier and Wowza Media Server™ software use the version of Java that the operating system uses.

Determine which version of Java your Wowza Streaming Engine instance is using


  • In Wowza Streaming Engine Manager, click Server in the menu bar and then click About in the contents panel.

The About Wowza Streaming Engine page displays the Java Version, Java VM Version, Java Architecture, and other details about the Java version that's in use.


Download and install Java


If you don't use the version of Java that installs with Wowza Streaming Engine, you can use a server version of Java Update 91 (8u91) or later.

  1. Go to the Oracle Java SE Downloads page and download a 64-bit version of a Java SE 8u91 or later JDK or Server JRE.
     
    Note: The only time you should install a 32-bit version of Java is if you're running Wowza Streaming Engine or Wowza Media Server on 32-bit Windows.
  2. Follow the instructions to install the Java environment.
     
  3. Confirm that Wowza Streaming Engine is using the new version. See Determine which version of Java your Wowza Streaming Engine instance is using, above.
     
  4. If Wowza Streaming Engine isn't using the right version of Java, point it to the version you installed. See Instruct Wowza Streaming Engine to use a specific version of Java, below.

Instruct Wowza Streaming Engine to use a specific version of Java


Important: Wowza Streaming Engine 4.2.0 and later automatically install a supported version of Java 8. Java 7 and earlier are not supported. Later versions of Java are untested, and using any version of Java other than what installs with Wowza Streaming Engine is not recommended.

Instruct Wowza Streaming Engine on Windows 10 to use a specific version of Java

On Windows, Wowza Streaming Engine 4.2.0 and later use the WMSJAVA_HOME environment variable to determine which Java environment in which to run. If you have problems starting Wowza Streaming Engine on Windows, make sure that WMSJAVA_HOME points to a Java 1.8 or later Java environment. If you change or upgrade your Java environment and the installation path changes, be sure to update WMSJAVA_HOME to point to the new location. The WMSJAVA_HOME environment variable should point to the base folder of the Java installation; the base folder is the folder that contains the bin folder.
 
  1. In Control Panel, click System and Security.
     
  2. Select System and then click Advanced system settings in the left column.
     
  3. On the Advanced tab of the System Properties window, click Environment Variables.


     
  4. In the Environment Variables window, in the System variables list, select WMSJAVA_HOME, and then click Edit.
     
    Note: For Wowza Streaming Engine 4.1.2 and earlier, select the JAVA_HOME variable.
  5. Change the Variable value to the path of the Java version you want to use.
     
    Note: Paths should point to a 64-bit version of Java at C:\Program Files\Java. Paths to C:\Program Files (x86)\Java point to a 32-bit version of Java.
  6. Save your changes.

Instruct Wowza Streaming Engine on macOS to use a specific version of Java

Update the Wowza Streaming Engine symbolic link (symlink) to point to the specific version of Java.
 
  • For Wowza Streaming Engine 4.2.0 and later, update the symbolic link at /Library/WowzaStreamingEngine/java to point to the new Java version. For example, if the new Java version is installed at /usr/lib/jvm/jdk1.8.0_31, execute the following commands:

    rm -rf /Library/WowzaStreamingEngine/java
    ln -sf /usr/lib/jvm/jdk1.8.0_31/bin/java /Library/WowzaStreamingEngine/java
  • For Wowza Streaming Engine 4.1.2 and earlier, update the symbolic link at /usr/bin/java to point to the new Java version. For example, if the new Java version is installed at /usr/lib/jvm/jdk1.8.0_31, execute the following commands:

    rm -rf /usr/bin/java
    ln -sf /usr/lib/jvm/jdk1.8.0_31/bin/java /usr/bin/java

Instruct Wowza Streaming Engine on Linux to use a specific version of Java

Update the Wowza Streaming Engine symbolic link (symlink) to point to the specific version of Java.
 
  • For Wowza Streaming Engine 4.2.0 and later, update the symbolic link at /usr/local/WowzaStreamingEngine/java to point to the new Java version. For example, if the new Java version is installed at /usr/lib/jvm/jdk1.8.0_31, execute the following commands:

    rm -rf /usr/local/WowzaStreamingEngine/java
    ln -sf /usr/lib/jvm/jdk1.8.0_31/ /usr/local/WowzaStreamingEngine/java

     
  • For Wowza Streaming Engine 4.1.2 and earlier, update the symbolic link at /usr/bin/java to point to the new Java version. For example, if the new Java version is installed at /usr/lib/jvm/jdk1.8.0_31, execute the following commands:

    rm -rf /usr/bin/java
    ln -sf /usr/lib/jvm/jdk1.8.0_31/bin/java /usr/bin/java

Troubleshooting


Get Java installation details and start Wowza Streaming Engine in console mode

If you run into problems when starting Wowza Streaming Engine, use the following commands to print the Java variables and start the software in console mode. The information you print may provide clues about the problem and provide context to help troubleshoot your installation, and the startup command will get Wowza Streaming Engine running.

Windows

  • For Wowza Streaming Engine 4.2.0 and later, open a Command Prompt window and type:
     
    echo %WMSJAVA_HOME%
    "%WMSJAVA_HOME%"\bin\java -version
    echo %WMSAPP_HOME%
    echo %WMSCONFIG_HOME%
    cd %WMSAPP_HOME%/bin
    startup.bat
  • For Wowza Streaming Engine 4.1.2 and earlier, open a Command Prompt window and type:
     
    echo %JAVA_HOME%
    "%JAVA_HOME%"\bin\java -version
    echo %WMSAPP_HOME%
    echo %WMSCONFIG_HOME%
    cd %WMSAPP_HOME%/bin
    startup.bat

macOS 

  • For Wowza Streaming Engine 4.2.0 and later, open a Terminal window and type:
     
    [install-dir]/WowzaStreamingEngine/java/bin/java -version
    cat [install-dir]/WowzaMediaServer/bin/setenv.sh
    cd [install-dir]/bin
    sudo ./startup.sh
  • For Wowza Streaming Engine 4.1.2 and earlier, open a Terminal window and type:
     
    which java
    java -version
    cat [install-dir]/WowzaMediaServer/bin/setenv.sh
    cd [install-dir]/bin
    sudo ./startup.sh 

Linux (Ubuntu/Debian/Fedora)

  • For Wowza Streaming Engine 4.2.0 and later, open a Terminal window and type:
     
    [install-dir]/WowzaStreamingEngine/java/bin/java -version
    cat [install-dir]/WowzaMediaServer/bin/setenv.sh
    cd [install-dir]/bin
    sudo ./startup.sh
  • For Wowza Streaming Engine 4.1.2 and earlier, open a Terminal window and type:
     
    which java
    java -version
    cat [install-dir]/WowzaMediaServer/bin/setenv.sh
    cd [install-dir]/bin
    sudo ./startup.sh
For further troubleshooting, post a question to the forum or open a Support ticket. (Technical support is included with all active subscriptions and maintenance and support contracts.) In the Support ticket form, be sure to share the Java variables you printed in your detailed problem description.

Instruct Wowza Streaming Engine to use the Java "en" locale

Wowza Streaming Engine may not start or may not run after starting when the Java environment points to certain locales, such as Turkish. To address this problem, instruct Wowza Streaming Engine to run under the "en" locale by editing the VMOption variable in the Tune.xml file.
 
  1. Open [install-dir]/conf/Tune.xml in a text editor and find the following line:

    <!-- <VMOption>-Duser.language=en -Duser.country=US -Dfile.encoding=Cp1252</VMOption> -->
     
  2. Uncomment the line by removing the <!-- from the beginning of the line and the --> from the end of the line, as follows:

    <VMOption>-Duser.language=en -Duser.country=US -Dfile.encoding=Cp1252</VMOption>
     
  3. Save your changes and restart Wowza Streaming Engine.
     
  4. Confirm that the settings have taken effect by opening the latest access log at [install-dir]/logs/wowzastreamingengine_access.log.YYYY-MM-DD and looking for following entries:

    INFO server comment - Java Locale[user.language]: en
    INFO server comment - Java Locale[user.country]: US
    INFO server comment - Java Locale[user.variant]:
    INFO server comment - Java Locale[file.encoding]: Cp1252