java-language-server
java-language-server copied to clipboard
Mason unable to install Java Language Server
New to vimming.
Have installed Mason, usually it installs LSPs without a hitch.
Get the following error when it tries to install the Java LSP:
Failed (1)
◍ java-language-server
▼ Displaying full log
Cloning into '.'...
From https://github.com/georgewfraser/java-language-server
* tag v0.2.39 -> FETCH_HEAD
+ ./scripts/link_mac.sh
+ mvn package -DskipTests
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.javacs:javac-services >----------------------
[INFO] Building javac-services 0.1-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.0:resources (default-resources) @ javac-services ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/varungawande/.local/share/nvim/mason/.packages/java-language-server/src/main/resources
[INFO]
[INFO] --- compiler:3.8.0:compile (default-compile) @ javac-services ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 357 source files to /Users/varungawande/.local/share/nvim/mason/.packages/java-language-server/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.560 s
[INFO] Finished at: 2023-05-07T12:47:39+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project javac-services: Fatal error compili
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
spawn: bash failed with exit code 1 and signal 0.
Here is my java and maven versions.
❯ java -version
openjdk version "11.0.19" 2023-04-18 LTS
OpenJDK Runtime Environment Microsoft-7621296 (build 11.0.19+7-LTS)
OpenJDK 64-Bit Server VM Microsoft-7621296 (build 11.0.19+7-LTS, mixed mode)
❯ mvn -v
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: /Users/varungawande/.sdkman/candidates/maven/current
Java version: 11.0.19, vendor: Microsoft, runtime: /Users/varungawande/.sdkman/candidates/java/11.0.19-ms
Default locale: en_IN, platform encoding: UTF-8
OS name: "mac os x", version: "13.3.1", arch: "aarch64", family: "mac"
In case we don't know what the error is, where can I find the logs to figure out what went wrong?
I made the same mistake, even if I changed the maven version.
I tried pulling down java-language-server for manual compilation, but the problem persisted.
I got the same mistake
I installed other version, its worked, the command is :MasonInstall [email protected]
same
same too
I also had the same issue
Even I had the same issues while installing with Mason.
Image attached for reference.
I installed other version, its worked, the command is :MasonInstall [email protected]
Even tried this. @byteboycn
I'm getting the same error:
✗ java-language-server
▼ Displaying full log
Cloning git repository "https://github.com/georgewfraser/java-language-server.git"…
Cloning into '.'...
From https://github.com/georgewfraser/java-language-server
* tag v0.2.39 -> FETCH_HEAD
+ ./scripts/link_linux.sh
./scripts/link_linux.sh: line 12: jlink: command not found
spawn: bash failed with exit code 127 and signal 0.
same too
update jdk version to the newest can solve this problem
Updated to java 20, still getting that error
same too
update jdk version to the newest can solve this problem
Updated to java 20, still getting that error
same too
update jdk version to the newest can solve this problem
Nevermind, I messed up and installed jre 20 instead of jdk 20. Its working now, thanks!
Even for me I fixed the issue by installing openjdk 17.0.7 but I wonder what the cause must be.
The older JDK11 did have the jlint binary in the PATH.
Forcing people to upgrade to the latest JDK is hardly the right solution, especially for Java users.
Must be a better way to solve this.
this is how i fix:
install sdkman
curl -s "https://get.sdkman.io" | bash
install openjdk (eclipse)
sdk install java 21.0.1-tem
install maven
sdk install maven
hello,I had the same problem at first, but after I updated the jdk version to dk22, I was able to install it successfully. Here is my version of the environment.
I hope this help you.
I'll be closing this issue as the README says that Java 13 is the minimum version required for this.
And upgrading is fixing it for everyone else.
If you're facing trouble due to another reason, please open another issue.