Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

Failed to locate JAVA_HOME when using /usr/libexec/java_home #6

Open
sh-cho opened this issue Jul 31, 2023 · 1 comment
Open

Failed to locate JAVA_HOME when using /usr/libexec/java_home #6

sh-cho opened this issue Jul 31, 2023 · 1 comment

Comments

@sh-cho
Copy link

sh-cho commented Jul 31, 2023

Describe the bug

$ echo $JAVA_HOME
/Users/vince/.local/share/rtx/installs/java/temurin-17.0.8+7

$ /usr/libexec/java_home
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.

I have installed rtx-java plugin.
$JAVA_HOME has been set, but /usr/libexec/java_home is failed to locate JAVA_HOME.

FYI, asdf-java's macOS integration was working (https://github.com/halcyon/asdf-java#java_home-integration) but it slows my entire shell 😞

To Reproduce

rtx plugin add java
rtx install java@temurin-17.0.8+7
rtx use -g java@temurin-17.0.8+7

rtx doctor output

$ rtx doctor
rtx version:
  1.35.7 macos-arm64 (unknown 2023-07-30)

build:
  Target: aarch64-apple-darwin
  Features: BREW, DEFAULT, NATIVE_TLS
  Built: Sun, 30 Jul 2023 23:56:12 +0000
  Rust Version: rustc 1.71.0 (8ede3aae2 2023-07-12) (built from a source tarball)
  Profile: release

shell:
  /bin/zsh
  zsh 5.8.1 (x86_64-apple-darwin22.0)

rtx data directory:
  /Users/vince/.local/share/rtx

rtx environment variables:
  RTX_SHELL=zsh

settings:
  {"always_keep_download": "false", "always_keep_install": "false", "asdf_compat": "false", "disable_default_shorthands": "false", "disable_tools": "[]", "experimental": "false", "jobs": "4", "legacy_version_file": "true", "legacy_version_file_disable_tools": "[]", "log_level": "INFO", "missing_runtime_behavior": "warn", "plugin_autoupdate_last_check_duration": "10080", "raw": "false", "trusted_config_paths": "[]", "verbose": "false"}

config files:
  /Users/vince/.config/rtx/config.toml

plugins:
  go       (core)
  java     https://github.com/rtx-plugins/rtx-java.git#b881802
  node     (core)
  python   (core)
  ruby     (core)
  rust     https://github.com/code-lever/asdf-rust.git#95acf4f

toolset:
  java@temurin-17.0.8+7, rust@1.71.0

No problems found

Additional context
Add any other context about the problem here.

@jdx
Copy link
Member

jdx commented Jul 31, 2023

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants