Package Details: jdtls 1.42.0-1

Git Clone URL: https://aur.archlinux.org/jdtls.git (read-only, click to copy)
Package Base: jdtls
Description: Eclipse Java language server
Upstream URL: https://github.com/eclipse/eclipse.jdt.ls
Licenses: EPL-2.0
Submitter: languitar
Maintainer: languitar
Last Packager: languitar
Votes: 27
Popularity: 0.002030
First Submitted: 2017-11-15 12:49 (UTC)
Last Updated: 2024-12-05 19:36 (UTC)

Dependencies (2)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 Next › Last »

fenuks commented on 2022-08-23 12:50 (UTC)

Package should require JDK 17, since it fails with error.

Exception: jdtls requires at least Java 17

languitar commented on 2022-01-28 08:29 (UTC)

@mynacol thanks for the hints. I have updated the script.

mynacol commented on 2022-01-27 17:43 (UTC)

Two minor improvement ideas to the launcher script:

  • use /bin/sh instead of /bin/bash (no fancy functions needed)
  • exec before the single java command. This allows the shell process to exit after startup.

schrieveslaach commented on 2022-01-21 20:13 (UTC)

Looks good to me. Thanks.

languitar commented on 2022-01-20 19:55 (UTC)

Oh sorry, forgot that the whole Gitlab group is private. Here's the proposed diff:

diff --git a/PKGBUILD b/PKGBUILD
index 62ec0ed1b9f4dde42e820eaea7cf77939da67b42..48185fc1215ef10ba701117e01966e2047ed98c2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@

 pkgname=jdtls
 pkgver=1.7.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Eclipse Java language server"
 arch=(any)
 url="https://github.com/eclipse/eclipse.jdt.ls"
@@ -12,7 +12,7 @@ makedepends=()
 source=("https://download.eclipse.org/jdtls/milestones/1.7.0/jdt-language-server-1.7.0-202112161541.tar.gz"
         "launcher.sh")
 sha256sums=('2f0c28dfec317a268ec44904420657181b43a7ba2a32f0bf788ea388dacb8552'
-            '813801c237676764f6fb005df3ccaaee33c7cc0ab54fc1c73ef3cf4cee5a65de')
+            '78c7dc2936dedd27011a787438e85888c3846a16115ae02b281eb672456d547c')

 package() {
     mkdir -p "${pkgdir}/usr/share/java/jdtls"
diff --git a/launcher.sh b/launcher.sh
index fdee5be1c57498f856094d453460c7ac2d3648be..2c320342a4de9126d884ccd10fb9464893ec5ba0 100755
--- a/launcher.sh
+++ b/launcher.sh
@@ -1,17 +1,14 @@
 #!/bin/bash

-# copy the configuration folder to tmp to be writable
-tmp_dir="$(mktemp -d /tmp/jdtls.XXXXX)"
-cp -R /usr/share/java/jdtls/config_linux "${tmp_dir}"
-# and ensure that it is removed on exit
-trap "{ rm -rf ${tmp_dir}; }" EXIT
-
 java \
     -Declipse.application=org.eclipse.jdt.ls.core.id1 \
     -Dosgi.bundles.defaultStartLevel=4 \
     -Declipse.product=org.eclipse.jdt.ls.core.product \
+    -Dosgi.checkConfiguration=true \
+    -Dosgi.sharedConfiguration.area=/usr/share/java/jdtls/config_linux \
+    -Dosgi.sharedConfiguration.area.readOnly=true \
+    -Dosgi.configuration.cascaded=true \
     -noverify \
     -Xms1G \
     -jar /usr/share/java/jdtls/plugins/org.eclipse.equinox.launcher_*.jar \
-    -configuration "${tmp_dir}/config_linux" \
     "$@"

schrieveslaach commented on 2022-01-20 12:44 (UTC) (edited on 2022-01-20 12:46 (UTC) by schrieveslaach)

@languitar, I've no access to the GitLab repo. Can you give me access? Here is my GitLab handle: https://gitlab.com/schrieveslaach

languitar commented on 2022-01-20 12:13 (UTC)

@schrieveslaach thanks for the hint. That feature didn't exist when I created the project.

Do you think these are the correct changes: https://gitlab.com/languitar-aur-packages/aur-jdtls/-/merge_requests/6/diffs

schrieveslaach commented on 2022-01-20 06:42 (UTC)

Based on this AUR package I created a Homebrew formula to install jdtls on MacOS. I discovered that you can get rid of the temporary folder creation by using some Java properties that will tell the Eclipse Equinox framework to use a shared configuration which make jdtls make package manager friendly.

Here are the properties: https://github.com/Homebrew/homebrew-core/blob/ec2f8b111eb89cc7e68360d418cde708248529ea/Formula/jdtls.rb#L20-L23

Do you mind to incorporate these properties.

languitar commented on 2020-11-20 18:13 (UTC)

@cwtb I started packaging this by using the git repository. Sometimes this failed, so I got in contact with the jdtls developers and they indicated that the preferred way of distributing jdtls is to use the milestone builds. I don't understand why the snapshot version is so much ahead of the milestone builds. May be this is something to be asked upstream.

cwtb commented on 2020-11-20 15:23 (UTC)

Have you looked into using snapshots instead of milestone releases keeping things updated? It looks like there is a version here that isn't in the milestones yet. Might not be as stable, but who knows https://download.eclipse.org/jdtls/snapshots/