Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin prevents system Java from working #132

Open
peterlobster opened this issue Mar 5, 2021 · 0 comments · May be fixed by #142
Open

Plugin prevents system Java from working #132

peterlobster opened this issue Mar 5, 2021 · 0 comments · May be fixed by #142

Comments

@peterlobster
Copy link

When the plugin is set to system as the global version, it gives out the following error...

$ java -v
Unable to locate an executable at "/Users/<user>/.asdf/plugins/java/set-java-home.bash/bin/java" (-1)

Is there a way to fix that?

delgurth added a commit to delgurth/asdf-java that referenced this issue Apr 5, 2021
Fixes halcyon#132

Added special case for macOS in all 4 set-java-home scripts. Also created tests to validate this. Unfortunately xonsh does not seem to have a way to exit with other status then 0, so this will not report errors (yet).

Updated the README.md to contain information on how to use the set-java-home scripts.

Cloned mstksg/get-package and released delgurth/get-package@v3 because it was using linuxbrew on Ubuntu and because I needed the apt-update (not released by mstksg) and -y flag in the apt-get install (when running github action on https://github.com/nektos/act)

added .editorconfig because of mixed indent styles
added .gitignore to ignore Intellij directory

asdf/asdf.sh needs $PWD in front as soon as you change directories

added tests for JAVA_HOME setting
added tests for macOS JAVA_HOME setting in case version is set to system

Unfortunately the tests are not exactly as it would be on a system because of the way github actions spawn shells. Have to call the bash function _asdf_java_prompt_command and the fish & zsh function asdf_update_java_home to actually update the JAVA_HOME.
@delgurth delgurth linked a pull request Apr 5, 2021 that will close this issue
delgurth added a commit to delgurth/asdf-java that referenced this issue Apr 6, 2021
Fixes halcyon#132

Added special case for macOS in all 4 set-java-home scripts. Also created tests to validate this. Unfortunately xonsh does not seem to have a way to exit with other status then 0, so this will not report errors (yet).

Updated the README.md to contain information on how to use the set-java-home scripts.

Cloned mstksg/get-package and released delgurth/get-package@v3 because it was using linuxbrew on Ubuntu and because I needed the apt-update (not released by mstksg) and -y flag in the apt-get install (when running github action on https://github.com/nektos/act)

added .editorconfig because of mixed indent styles
added .gitignore to ignore Intellij directory

asdf/asdf.sh needs $PWD in front as soon as you change directories

added tests for JAVA_HOME setting
added tests for macOS JAVA_HOME setting in case version is set to system

Unfortunately the tests are not exactly as it would be on a system because of the way github actions spawn shells. Have to call the bash function _asdf_java_prompt_command and the fish & zsh function asdf_update_java_home to actually update the JAVA_HOME.
delgurth added a commit to delgurth/asdf-java that referenced this issue Apr 6, 2021
Fixes halcyon#132

Added special case for macOS in all 4 set-java-home scripts. Also created tests to validate this. Unfortunately xonsh does not seem to have a way to exit with other status then 0, so this will not report errors (yet).

Updated the README.md to contain information on how to use the set-java-home scripts.

Cloned mstksg/get-package and released delgurth/get-package@v3 because it was using linuxbrew on Ubuntu and because I needed the apt-update (not released by mstksg) and -y flag in the apt-get install (when running github action on https://github.com/nektos/act)

added .editorconfig because of mixed indent styles
added .gitignore to ignore Intellij directory

asdf/asdf.sh needs $PWD in front as soon as you change directories

added tests for JAVA_HOME setting
added tests for macOS JAVA_HOME setting in case version is set to system

Unfortunately the tests are not exactly as it would be on a system because of the way github actions spawn shells. Have to call the bash function _asdf_java_prompt_command and the fish & zsh function asdf_update_java_home to actually update the JAVA_HOME.
@jdx jdx mentioned this issue Mar 25, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant