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

kafka-gitopts via homebrew : look for java in JAVA_HOME ? #98

Open
karawitan opened this issue Jan 4, 2023 · 1 comment
Open

kafka-gitopts via homebrew : look for java in JAVA_HOME ? #98

karawitan opened this issue Jan 4, 2023 · 1 comment

Comments

@karawitan
Copy link

karawitan commented Jan 4, 2023

Hello,

Looks like the kafka-gitops depends on openjdk;
But kafka-gitops should not point at a specific java version;
Maybe you can use JAVA_HOME, as defined by homebrew ?

brew install kafka-gitops
Running `brew update --auto-update`...

(...)

==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/236228216/52467080-7181-11eb-96e0-38a372bc20f3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230104%2Fus-east-1%2Fs3%2Faws4_requ
######################################################################## 100.0%
==> Installing kafka-gitops from devshawn/kafka-gitops
🍺  /opt/homebrew/Cellar/kafka-gitops/0.2.14: 3 files, 13MB, built in 1 second

(...)

m1:~ kalou$ cd
m1:~ kalou$ kafka-gitops
/opt/homebrew/bin/kafka-gitops: line 8: /opt/homebrew/Cellar/openjdk/19/bin/java: No such file or directory
/opt/homebrew/bin/kafka-gitops: line 8: exec: /opt/homebrew/Cellar/openjdk/19/bin/java: cannot execute: No such file or directory

m1:~ kalou$ echo $JAVA_HOME
/opt/homebrew/Cellar/openjdk/19

m1:~ kalou$ brew list | grep jdk
openjdk
m1:~ kalou$ ls -ld /opt/homebrew/Cellar/openjdk/*/bin
drwxr-xr-x  31 kalou  staff  992 Sep 13 16:16 /opt/homebrew/Cellar/openjdk/19.0.1/bin

@karawitan karawitan changed the title kafka-gitopts via homebrew : needs dependency upon java kafka-gitopts via homebrew : openjdk dependency Jan 4, 2023
@karawitan karawitan changed the title kafka-gitopts via homebrew : openjdk dependency kafka-gitopts via homebrew : look for java in JAVA_HOME ? Jan 4, 2023
@joschi
Copy link

joschi commented Jan 16, 2023

@karawitan As you can see in the output you've posted, your JAVA_HOME environment variable is incorrect.

m1:~ kalou$ echo $JAVA_HOME
/opt/homebrew/Cellar/openjdk/19

m1:~ kalou$ brew list | grep jdk
openjdk
m1:~ kalou$ ls -ld /opt/homebrew/Cellar/openjdk/*/bin
drwxr-xr-x  31 kalou  staff  992 Sep 13 16:16 /opt/homebrew/Cellar/openjdk/19.0.1/bin

After setting JAVA_HOME to the correct directory (/opt/homebrew/Cellar/openjdk/19.0.1), it should work.

If the JAVA_HOME environment variable does not exist, it should work as long as java is on your PATH.

https://github.com/devshawn/kafka-gitops/blob/0.2.15/stub.sh#L5-L7

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

No branches or pull requests

2 participants