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

[ENH] Use javac from JAVA_HOME in gradle build #127

Open
Michi03 opened this issue Jan 26, 2022 · 0 comments
Open

[ENH] Use javac from JAVA_HOME in gradle build #127

Michi03 opened this issue Jan 26, 2022 · 0 comments

Comments

@Michi03
Copy link
Contributor

Michi03 commented Jan 26, 2022

  1. Motivation - The gradle build files of the respective las2peer components define their own compile tasks, which call the java compiler (javac). This itself is fine, however depending on the context this can lead to unexpected problems which might be very hard to detect, since we don't use the javac binary from the JAVA_HOME directory, as one would expect. The resulting error looks like this:
> Task :core:compileJava FAILED
error: invalid source release: 17
Usage: javac <options> <source files>
  1. Specification - This should be rather easy to fix by replacing javac in the compile java task (here, here, and here ) with a reference to the JAVA_HOME variable. There are multiple ways to achieve this, discussed in this thread. Just take care that the build also still works if the variable isn't set.
  2. Finalised state - The las2peer build should then use the java compiler pointed to by the JAVA_HOME environment variable, if it is set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant