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

Check for Java 17 in lfc scripts and properly exit on error #1136

Merged
merged 2 commits into from
May 3, 2022
Merged

Conversation

cmnrd
Copy link
Collaborator

@cmnrd cmnrd commented May 3, 2022

This updates the build and launch lfc scripts to check for a Java 17 runtime (instead of 11). Also it introduces a small fix that let's the script exit gracefully if no Java 17 runtime was found.

@cmnrd cmnrd requested a review from lhstrh May 3, 2022 07:39
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

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

Nice catch! We should update the ps1 script accordingly as well...

@lhstrh lhstrh requested a review from petervdonovan May 3, 2022 21:58
Copy link
Collaborator

@petervdonovan petervdonovan left a comment

Choose a reason for hiding this comment

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

I can confirm that this works on Windows, correctly producing the following error:

JRE 11.0.12.0 found but 17.0 or greater is required.
At C:\lingua-franca\bin\lfc.ps1:46 char:5
+     throw "JRE $java_version found but 17.0 or greater is required."
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (JRE 11.0.12.0 f...er is required.:String) [], RuntimeException
    + FullyQualifiedErrorId : JRE 11.0.12.0 found but 17.0 or greater is required.

@lhstrh
Copy link
Member

lhstrh commented May 3, 2022

Excellent. Thank you for checking, @petervdonovan!

@lhstrh lhstrh merged commit 774ca3c into master May 3, 2022
@lhstrh lhstrh deleted the lfc-fix branch May 3, 2022 22:44
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