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

Zulu JDK is recognized as OpenJDK (plus a collection of readme fixes) #185

Open
LIttleAncientForestKami opened this issue Feb 10, 2018 · 1 comment

Comments

@LIttleAncientForestKami
Copy link
Contributor

Zulu JDK (one installed through SDKMAN) is being recognized as OpenJDK. This is due to ordering in ifs and the fact Zulu is repackaged OpenJDK, but with notably different provider and others). I'll create a pull request for this shortly.

Noteworthy - I have one JDK and jenv parsed the output of java -version and found three (yes, 3). While I don't agree, I won't tackle this in this issue, since I found it in #136.

@LIttleAncientForestKami
Copy link
Contributor Author

Reason for mis-recognition is simple:

  1. Open https://github.com/gcuisinier/jenv/blob/master/libexec/jenv-add
  2. See the part where JAVA_PROVIDER is being set:
if $JENV_JAVAPATH/bin/java -version 2>&1 | grep -q "HotSpot"; then
			JAVA_PROVIDER="oracle"
		else
		   	if $JENV_JAVAPATH/bin/java -version 2>&1 | grep -q "OpenJDK"; then
				JAVA_PROVIDER="openjdk"
			else
				if $JENV_JAVAPATH/bin/java -version 2>&1 | grep -q "J9"; then
					JAVA_PROVIDER="ibm"
        else
          if $JENV_JAVAPATH/bin/java -version 2>&1 | grep -q "SAP"; then
  					JAVA_PROVIDER="sap"
				  else

					  JAVA_PROVIDER="other"
          fi;
				fi;
			fi;
fi;

I've added new grep call PRIOR to OpenJDK one, since Zulu repackages and certifies OpenJDK and in it's java -version you will find both OpenJDK and Zulu.

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

1 participant