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 you can manually install and use a different version of Java.

Important: Wowza Streaming Engine version 4.7.8 and later requires OpenJDK Java SE JRE 9.0.4 at a minimum, but supports up to Java version 12. Earlier versions of Java aren't supported. Previous versions of Wowza Streaming Engine (version 4.7.7) required Java 8.

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 that it requires.

With Wowza Streaming Engine 4.8.5, we repackaged the version of OpenJDK Java SE JRE 9.0.4 installed with Wowza Streaming Engine 4.8.5 and later. This custom packaged version of OpenJDK Java SE JRE 9.0.4 is recommended for Wowza Streaming Engine 4.8.5 and later and includes the java.scripting module required for Wowza Streaming Engine 4.8.8.01 and later. The java.scripting module is also included in Java 9-12.

Note: Updaters for Wowza Streaming Engine 4.8.5 and later do not install the custom packaged version of OpenJDK Java SE JRE 9.0.4 or the java.scripting module. If you are updating from Wowza Streaming Engine 4.8.0 or earlier and want to use the custom packaged version of OpenJDK Java SE JRE 9.0.4 (available from the Downloads tab of My Account) or another version of Java (9-12) that includes the java.scripting module, follow the instructions in this article to install Java and instruct Wowza Streaming Engine to use that version.

If you can’t or don’t want to use the version of Java that installs with Wowza Streaming Engine, you can use Java version 9 - 12. 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.

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 want to use a different version of Java than the one you have, follow these steps:

  1. Download the version of Java to use.
     
    • OpenJDK Java SE JRE 9.0.4 – For your convenience, we've provided the custom packaged OpenJDK Java SE JRE 9.0.4 installed with Wowza Streaming Engine 4.8.5 and later as a zip file on the Downloads tab of My Account. If using this to update your Java installation, you must unzip the package, select the folder that matches your Operating System, and then copy and paste the contents into your Wowza Streaming Engine [install-dir]/jre directory.
    • Other Java versions – If you want to use a different version of Java, go to the OpenJDK Java Archive page and download a 64-bit version of a Java 9 - 12 JDK or Server JRE. 
       
      Note: 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

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 the installed 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/jdk9.0.4, execute the following commands:

    rm -rf /Library/WowzaStreamingEngine/java ; 
    ln -sf /usr/lib/jvm/jdk9.0.4/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/jdk9.0.4, execute the following commands:

    rm -rf /usr/bin/java ; 
    ln -sf /usr/lib/jvm/jdk9.0.4/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/jdk9.0.4, execute the following commands:

    rm -rf /usr/local/WowzaStreamingEngine/java ; 
    ln -sf /usr/lib/jvm/jdk9.0.4/ /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/jdk9.0.4, execute the following commands:

    rm -rf /usr/bin/java ; 
    ln -sf /usr/lib/jvm/jdk9.0.4/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