Skip to content

Fix #3304: Launch script now requires Java 8 #3307

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

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

allanrenucci
Copy link
Contributor

No description provided.

dist/bin/common Outdated
JAVA_VERSION=$("$JAVACMD" -Xmx512M -version 2>&1 | grep ' version "' | sed 's/.*version "\([0-9]*\)\(\.[0-9]*\)\{0,1\}\(.*\)*"/\1\2/; 1q')

if [ "$JAVA_VERSION" != "1.8" ] ; then
echo "Error: Java 8 is required, actual $JAVA_VERSION"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be nice if the message explained that a different version of Java could be set by using the JAVA_HOME environment variable.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @allanrenucci !

dist/bin/common Outdated
@@ -61,6 +61,14 @@ if [ ! -x "$JAVACMD" ] ; then
exit 1
fi

# parses 1.7, 1.8, 9, etc out of java version "1.8.0_91"
JAVA_VERSION=$("$JAVACMD" -Xmx512M -version 2>&1 | grep ' version "' | sed 's/.*version "\([0-9]*\)\(\.[0-9]*\)\{0,1\}\(.*\)*"/\1\2/; 1q')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor note: why -Xmx512M, it seems it's not necessary. But to be safer, let's just keep it as it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I suppose it is not needed here

@liufengyun liufengyun merged commit c710052 into scala:master Oct 12, 2017
@liufengyun liufengyun deleted the fix-#3304 branch October 12, 2017 12:36
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 this pull request may close these issues.

3 participants