Bug: J2S compiler not activated on Linux/macOS (Wrong ".J2S" file name) #54
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.
Cause
In Java2ScriptCompiler the literals ".J2S" and ".j2s" are used as names
for the J2S compiler options file (the "dot-j2s" file). The literals
only differ in the case of the letters.
On Windows both literals ".J2S" and ".j2s" denote the same file. However
on other operating systems (like Linux and macOS) the two literals (can)
identify two different files. This is because these operating
system have (or can have) case-sensitive file systems.
As a consequence adding a file ".j2s" (with lower case letters) to a
project will not activate the J2S compiler on Linux and macOS because
the compiler's "isActive" method checks for the file ".J2S" (with upper
case letters) and does not find such a file.
Solution
Always use one unique name for the J2S compiler options file (".j2s"),
accessible through constant
Java2ScriptCompiler.J2S_OPTIONS_FILE_NAME.Also