How to set the JAVA_HOME environment in ADF for an Azure Function

Shabash, Boris 0 Reputation points


I'm writing an Azure Function in Python which connects to an IBM informix database. I'm using jaydebeapi as the connection library, and connecting using JDBC. However, when I run the connection code

conn = jaydebeapi.connect(...)

The error I get is No JVM shared library file ( found. Try setting up the JAVA_HOME environment variable properly.

My suspicion is that I need to set the JAVA_HOME variable for the function, but I have no idea how to do so for an Azure Function in ADF, nor where the directory should point to. How would I go about this?

Please don't reply with answers about the ADF linked service to Informix, I know about it, I don't want it, I need to do this via an Azure Functions for reasons.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,219 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,494 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Arjun Karthikeyan S 155 Reputation points

    Hi Shabash, Boris

    Good day,

    To set the "JAVA_HOME" environment variable, login to and follow the below steps,

    1. Navigate to your Azure Function's resource.
    2. In the left-hand menu, navigate to Configuration under settings.
    3. Under Application settings, Click on "New Application Setting".
    4. Set the name field as "JAVA_HOME" and value field to the path of your Java installation directory and click on save.

    Once you have saved the changes, restart your Azure Functions.

    Thank you.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have an extra question about the answer, please click "Comment".