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

Move checkJava logic into Java code #4061

Closed
tothtamas28 opened this issue Feb 28, 2024 · 2 comments · Fixed by #4095
Closed

Move checkJava logic into Java code #4061

tothtamas28 opened this issue Feb 28, 2024 · 2 comments · Fixed by #4095
Assignees

Comments

@tothtamas28
Copy link
Contributor

When running kompile (and potentially other tools of the K toolkit), a script checkJava is run to check version compatibility of the installed JRE with K.

If possible (i.e. if each tool that runs checkJava eventually ends up running Java code), consider moving this logic into the Java code base, as introspecting the running JVM for its version is simpler and less error-prone than parsing version strings from diverse sources.

Related: #4059

@Baltoli
Copy link
Contributor

Baltoli commented Mar 5, 2024

The main reason that this logic lives in the Bash script is to avoid spinning up a JVM if Nailgun is running; we should perhaps just fix the string processing as a first pass at the issue.

This is pretty old code, and we should also take the opportunity to refactor the script if there are opportunities to do so.

@Baltoli
Copy link
Contributor

Baltoli commented Mar 5, 2024

We should make an effort to give a good message for Java >= 11; older versions we can just bail out. The reason for this is that from 8 -> 11 the version numbering scheme changed, and so our logic can be more consistent by only supporting one format.

@Baltoli Baltoli self-assigned this Mar 5, 2024
@Baltoli Baltoli linked a pull request Mar 13, 2024 that will close this issue
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 a pull request may close this issue.

2 participants