Skip to content

Use pre-existing JDK installations #706

Closed

Description

@sebthom

I would like to use vfox on github action runners in a way that in case a JDK is already installed vfox does not download the JDK again but the pre-installed one can be registered into vfox.

I would like to be able to do something like this:

# in a initial step I search for installed JDKs and register them with vfox
vfox register java@11-tem /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.27-6
vfox register java@21-tem /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.3

# in later steps I want to call `vfox install java` via some external bash script like this:
vfox install java@11-tem  # should be a no-op since already installed
vfox install java@21-tem  # should be a no-op since already installed
 # query the install dirs of multiple JDKs so I can reference them in Maven's toolchains.xml
JAVA_11_HOME=$(vfox home java@11-tem) 
JAVA_21_HOME=$(vfox home java@21-tem) 

Is this already possible somehow? If not could something like this be added?

Activity

  1. yeroc commented on Oct 16, 2025

    @yeroc

    I'm also wondering whether this is possible. Not just for Github runners, but on my workstation as well. I already have system-packaged Java SDKs installed and would like vfox to either auto-detect and use them or at least allow me to manually register them.

  2. aooohan commented on Sep 12, 2026

    @aooohan
    Member

    Transferred from vfox-java because registering an existing SDK requires core support, rather than a Java plugin hook. The current CLI has no register/import command, and the requested home command is not currently available either.

    This remains an open feature request. A core implementation should track externally owned SDK paths, integrate them with installed-version lookup and version selection, avoid re-downloading registered versions, and ensure uninstall/unregister does not delete externally managed JDKs. It should also provide a supported way to query a selected SDK directory.

    No implementation is included in this transfer; the original request and discussion are preserved here.

  3. self-assigned this
    on Oct 22, 2026
  4. linghengqian commented on Oct 22, 2026

    @linghengqian
    Member

    See #736 .

  5. added this to the 1.0.14 milestone on Oct 29, 2026
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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions