Package Details: java-language-server 0.2.39-1

Git Clone URL: https://aur.archlinux.org/java-language-server.git (read-only, click to copy)
Package Base: java-language-server
Description: Java language server using the Java compiler API
Upstream URL: https://github.com/georgewfraser/java-language-server
Keywords: java jvm language server
Licenses: MIT
Provides: java-language-server
Submitter: GrimKriegor
Maintainer: GrimKriegor
Last Packager: GrimKriegor
Votes: 6
Popularity: 0.016442
First Submitted: 2019-06-06 15:57 (UTC)
Last Updated: 2022-11-25 18:59 (UTC)

Dependencies (3)

Required by (0)

Sources (2)

Latest Comments

1 2 Next › Last »

gscout commented on 2023-11-15 15:51 (UTC) (edited on 2023-11-15 15:52 (UTC) by gscout)

Hello, I propose the following simple modification

commit 7c295dde58fd68b587ef5023957101f304d8c5f7
Date:   Wed Nov 15 16:21:43 2023 +0100

    Fix way to find latest Java version

    * Fix regex as noticed by https://aur.archlinux.org/packages/java-language-server#comment-915521
    * Sort by version as requested by https://aur.archlinux.org/packages/java-language-server#comment-903402

diff --git a/PKGBUILD b/PKGBUILD
index 12f138f..a4f8465 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ sha256sums=('c06a3e5fbe387ed883c0652aece79ea00603e6e6d2a4f54400701807185b7eef'
             '26eb4214d744c16cd4e8976e495f6cad8c7c98d4ffad3ec79b71b6241e0a1bbf')

 build() {
-    jdk="$(find /usr/lib/jvm -maxdepth 1 -regex ".*1[4-9].*" | head -1)" &&
+    jdk="$(find /usr/lib/jvm -maxdepth 1 -regex ".*[0-9]+.*" | sort -V -r | head -1)" &&
       test -n "$jdk" && export JAVA_HOME="$jdk"
     cd "${srcdir}/${pkgname}-${pkgver}"
     ./scripts/link_linux.sh

dawid.loubser commented on 2023-05-18 09:24 (UTC)

The logic in the PKGBUILD to find and set JAVA_HOME no longer works correctly when having Java 20+ installed.

Changing to -regex ".2[0-9]." worked for me, but I think this is a generally flawed approach.

Riedler commented on 2023-04-20 09:07 (UTC) (edited on 2023-04-20 09:07 (UTC) by Riedler)

oh nevermind, your PKGBUILD is just not finding the jvm correctly. The language server wants java 18. Please update it accordingly.

Riedler commented on 2023-04-20 08:52 (UTC)

maven now explicitly wants java 18, but if I set my env to java 18, it doesn't like java 18 anymore.

like a fucking toddler. I hate java.

LB-Planner commented on 2023-02-23 20:04 (UTC)

regarding the method of picking JDK: please sort the paths. If you don't, they just come along however linux likes. Maybe your fs is ordered alphabetically, but btrfs isn't.

ouuan commented on 2021-06-19 09:35 (UTC)

The java version should be 16 now.

GrimKriegor commented on 2021-04-28 18:47 (UTC)

@Techcable, excellent point.

It appears we are actually at v0.2.38, but the latest available tag is v0.2.32.

The developer has been notified, regarding the missing tags.

Will update as soon as a new tag is available.

Thank you for your patience.

Techcable commented on 2021-03-18 22:24 (UTC)

I'm confused about the versioning of this package. The vscode package says it's been updated to 0.2.37 yet we're still on 0.2.32? Github's latest tag is 0.2.32 but package.json says it's 0.2.33. Odd.....

anwait commented on 2021-01-20 20:34 (UTC)

I could fix the dependency problem by changing the java-runtime dependency while reinstalling to >=14 but it should be changed in this package if you don't want to enforce everyone changing it themselves.

LnLcFlx commented on 2021-01-11 14:52 (UTC)

I get a dependency error while updating jre-openjdk as it installs Java 15. Is it possible to change the dependencies tojava-runtime=15 and java-runtime=15?