Jump to content
  • Migrate WebFOCUS from Oracle Java to OpenJDK

    Pablo Alvarez

    After Oracle announced that their Java release wouldn’t be free anymore for production environments, several customers wanted to get rid of it and started using OpenJDK packages instead. ibi already moved on the same path and we started using OpenJDK in our products a few releases ago (even we went back to Oracle in the latest versions).

    This documentation will try to help you moving from Oracle to OpenJDK.

    In my case, I’m going to use Adoptium as my Java OpenSource JDK. So, to use the 11 release, I had to install Temurin: https://adoptium.net/temurin/archive/?version=11

    Once installed, there are a few steps that need to be performed to make WebFOCUS work with this new JDK.

    As WebFOCUS installs by default its own Java (depending on the platform), the easiest way (in my opinion) is, with the services stopped, no matter if Linux/UNIX or Windows, to rename the folders where they are located, for example C:\ibi\tomcat\jdk and C:\ibi\WebFOCUS93\jdk

    That way the product won’t be able to find this Oracle Java release, but it’ll also fail to start services or make calls. 

    To fix that, I recommend to create soft links to point to the desired Java release and keeping the files for the product untouched, for example, if I have my Adoptium Java installed on 

    C:\Java\Adoptium → Inside I’ve the C:\Java\Adoptium\jdk11


    On Linux it’s as follows:

    /usr/etc/adoptium → And inside the jdk11: /usr/etc/adoptium/jdk11


    So for Windows, I use the mklink command:

    mklink /D C:\ibi\tomcat\jdk C:\Java\Adoptium\jdk11
    mklink /D C:\ibi\WebFOCUS93\jdk C:\Java\Adoptium\jdk11


    On Linux/UNIX:

    ln -s /usr/etc/adoptium/jdk11 /opt/ibi/tomcat/jdk
    ln -s /usr/etc/adoptium/jdk11 /opt/ibi/WebFOCUS93/jdk


    That’ll fix some part of the issues you can find when migrating to OpenJDK, most of them if you already have the product installed and based on the Oracle Java release, so let’s go for the next ones…

    In case that you use Derby as Repository, it also has it’s own jdk inside, so you’ll need to repeat the process for the softlinks there as well: C:\ibi\derby\jdk.



    You’ll need to replace the JAVA_HOME, JDK_HOME and JRE_HOME (if needed) to point to hte new ones

    I created an ADOPTIUM_HOME environment variable on my Windows box, so I just have to replace the rest of them pointing to that one.

    This is what I had before:


    And now I have it as follows:


    If using command lines Windows uses ‘set’:

    set ADOPTIUM_HOME=C:\Java\Adoptium\jdk11

    After that, you can just type ‘set’ on a command prompt and you’ll see if your changes are in place.

    This way, I just need to switch the JAVA_HOME back to the Oracle one in case I want to revert my changes.

    On Linux it’s quite similar, you must replace the old values for the new ones 

    set ADOPTIUM_HOME=/usr/etc/adoptium/jdk11

    (notice that in Linux, instead of use %variablevalue% it is just $variablevalue)

    Type ‘env’ on a command prompt to see if the changes have been made.


    For the Reporting Server side, there’s not too much to do, as it picks the values from the environment variables, so just check that your JAVA service (JSCOM) is using the OpenJDK one and that should be all. 

    For the WebFOCUS Client, as it picks Java from Tomcat, there’s nothing much to do there either. In Windows, you can change the default JVM being used on Tomcat’s Configuration Utility, but if you’ve correctly created the soft links, you don’t need to change it:




    The same happens with WebFOCUS ReportCaster, WebFOCUS Search (Solr) and Derby. If the soft links are correctly configured, nothing else needs to be done.

    We’ll have a separate chapter for AppStudio in a few.

    Just in case you want to keep (in Windows) one service to be used with Oracle Java (or different OpenJDK releases), and another with your new OpenJDK, you can follow these steps… 

    For ReportCaster, copy and rename the ‘service.bat’ file under C:\ibi\WebFOCUS93\ReportCaster\bin, with a different name, like ‘service_openjdk.bat’ and edit it.

    Modify some entries there to point to your desired OpenJDK environment variables:



    Notice that I’ve replaced the JAVA_HOME that already pointed to the soft link I created just for this documentation, that C:\ibi\WebFOCUS93\jdk can be the Oracle Java one and ReportCaster can use the Adoptium one doing these changes.

    I’ve also modified the name which the service will use to be created:



    And with these changes, you can now run it passing as parameters the ‘install’ option and some extra text that will be added to differentiate:

    service_openjdk.bat install RCAdoptium 

    Now you have a new service that will use the OpenJDK to start ReportCaster:



    If you have issues starting this service, check the properties of the service and make sure that at the Log On tab you have the Local System Account checked:




    You can do the same for Solr by editing the file ibi_solr_service_cfg.ps1 under C:\ibi\WebFOCUS93\Solr




    Remember that you just can have one of each service up and running, as both will use the same configuration files, hence they’ll be using the same ports.


    WebFOCUS AppStudio 

    For the WebFOCUS AppStudio, things are a little bit different, if you already have it installed, you just need to follow the ‘rename and create soft link’ tasks as we did for the WebFOCUS93 folder but under C:\ibi\AppStudio93\jdk, and that should be all.


    But… if you don’t have it installed and you don’t want to use Oracle Java at all you have two options. The AppStudio installer first uncompresses the installation, which contains Oracle Java, and uses that one for the installation. If you don’t want to use it at all (even if you don’t have it installed on your server, the installer will use the one that comes with it), here are the options:

    • Option 1:
      • Through the command line export this variable:
        set JAVA_TOOL_OPTIONS=”-Dos.name=Windows 7” 
        This will enable the compatibility mode for the CMD installer
        o    Execute the installation with the following command: IBI_wf-as_9.3.0_win_x86_64.exe LAX_VM “C:\Java\Adoptium\jdk11\bin\java.exe”
        o    Once installed, repeat the process for creating the soft link under C:\ibi\AppStudio93\jdk pointing to your OpenJDK
    • Option 2:
      • Uncompress the IBI_wf-as_9.3.0_win_x86_64.exe for example under C:\Temp\IBI_wf-as_9.3.0_win_x86_64
      • Replace the C:\Temp\IBI_wf-as_9.3.0_win_x86_64Windows_Pure_64_Bit\resource\jre with the one that comes with your OpenJDK (C:\Java\Adoptium\jdk11\jre)
      • Install the product using the following commands:
        SET JAVA_TOOL_OPTIONS="-Dos.name=Windows 7"
        C:\Temp\IBI_wf-as_9.3.0_win_x86_64\Windows_Pure_64_Bit\installWebFOCUS930.exe LAX_VM "C:\Temp\IBI_wf-as_9.3.0_win_x86_64\Windows_Pure_64_Bit\resource\jre\bin\java.exe


    Wait for the product to finish the installation and that’ll be all.

    Happy OpenSource executions!

    • Like 1

    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...