Skip to content

Should we stop honoring JAVA_HOME in favor of a dedicated environment variable #55820

@jasontedor

Description

@jasontedor

Awhile ago, we stopped honoring generic environment variables. That is environment variables that have some convention in the community (but are not actually built in to the JVM). For example, we honor our own ES_JAVA_OPTS over JAVA_OPTS. A primary reason that we do this is to avoid conflicts where a user has set some values in JAVA_OPTS that they wouldn't want applying to Elasticsearch. Having a dedicated environment variable avoids surprises and actually simplifies administration (since it's rare to expect there to be a common JVM flag to apply to every JVM that might execute on a system).

Yet, we still honor JAVA_HOME which has the same pitfalls, where the system could have JAVA_HOME configured despite a user not necessarily wanting to use the system Java with Elasticsearch.

Should we drop honoring JAVA_HOME to give the user explicit control over which Java is used via a dedicated environment variable ES_JAVA_HOME (or, the bundled JDK if it is not set)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scriptsTeam:DeliveryMeta label for Delivery team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions