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

Scala Native scripts don't work with Java 10 #3

Closed
cstroe opened this issue Aug 20, 2018 · 3 comments
Closed

Scala Native scripts don't work with Java 10 #3

cstroe opened this issue Aug 20, 2018 · 3 comments

Comments

@cstroe
Copy link
Collaborator

cstroe commented Aug 20, 2018

I ran the sbt universal:packageBin task to create a Scala Native package.

When trying to run the scripts, I get this:

$ ./find-duplicate-files

The java installation you have is not up to date
requires at least version 1.6+, you have
version 10.0.1

Please go to http://www.java.com/getjava/ and download
a valid Java Runtime and install before running .

It seems the Scala Native scripts are not compatible with Java 10.0.1.

@cstroe
Copy link
Collaborator Author

cstroe commented Aug 20, 2018

Seems like the java_version_check() needs to be updated:

# Now check to see if it's a good enough version
# TODO - Check to see if we have a configured default java version, otherwise use 1.6
java_version_check() {
  readonly java_version=$("$java_cmd" -version 2>&1 | awk -F '"' '/version/ {print $2}')
  if [[ "$java_version" == "" ]]; then
    echo
    echo No java installations was detected.
    echo Please go to http://www.java.com/getjava/ and download
    echo
    exit 1
  elif [[ ! "$java_version" > "1.6" ]]; then
    echo
    echo The java installation you have is not up to date
    echo $app_name requires at least version 1.6+, you have
    echo version $java_version
    echo
    echo Please go to http://www.java.com/getjava/ and download
    echo a valid Java Runtime and install before running $app_name.
    echo
    exit 1
  fi
}

@cstroe
Copy link
Collaborator Author

cstroe commented Aug 20, 2018

Seems like we can just update the SBT plugin: sbt/sbt-native-packager#1145

@cstroe
Copy link
Collaborator Author

cstroe commented Aug 20, 2018

Updating the native packager version to 1.3.6 fixes this.

fedeoasi added a commit that referenced this issue Aug 20, 2018
Fix #3: Update native packager plugin to 1.3.6
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