provide a configuration for the location of java executable #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recent Fernflower requires JDK17 to run, however, I have to use JDK11 as my main JDK on the system, and I can't switch to JDK17 and back whenever I need decompilation. This patch introduces a custom variable to specify what Java executable to use. Nothing will change for existing users by default. This is the same approach taken by packages such as lsp-java or eglot.
Additionally, I fixed a bug - when modern Fernflower runs on older JDK it doesn't produce any files, hence
(cl-first (jdecomp--java-files destination))
returnednil
, and (insert-file-contents nil)` caused an ambigous error. Now, we check if there are files first, and if not throw a proper error, with the process output for easier debugging.Also fixed a bunch of warnings.