Skip to content

potential failure of activation when JDK <11 is also installed #1621

Closed

Description

@Eskibear

Context

It simply finds the first available JDK in below order:

Steps

Now since it requires JDK 11+, a broken case is:

  • both JDK 8 and JDK 11 installed
  • java.home not set (for most new users)
  • JAVA_HOME points to JDK 8

It will pick JDK 8, and request users to install JDK 11+.

Possible solution

Add new options to find-java-home, like minVersion (requires the library to check version), or request the library to return all possible java homes.

Activity

  1. Eskibear commented on Oct 29, 2020

    @Eskibear
    ContributorAuthor

    ultimately it would be perfect to provide new APIs in upstream, tracked in jsdevel/node-find-java-home#28

  2. testforstephen commented on Oct 30, 2020

    @testforstephen
    Collaborator

    A good finding, looks like this is not a rare case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions