Put this bash script into the appropriate location
See original GitHub issueIt’d be nice to include it into the prebuilt packages. It makes starting the server easier.
#!/usr/bin/env bash
set -e;
CD=`dirname "${BASH_SOURCE[0]}"`; # current directory
CD=`realpath $CD`;
echo "CD: $CD";
echo "Args: $@"
SERVER=$CD; # path to language server dir. Useful, when utilising this script for other distributions of this language server
PLUGINS=$SERVER/plugins;
LAUNCHER=$PLUGINS/$(ls -1 "$PLUGINS" | grep -P "org\\.eclipse\\.equinox\\.launcher_.+\\.jar");
#LAUNCHER=/usr/share/maven-repo/org/eclipse/equinox/org.eclipse.equinox.launcher/debian/org.eclipse.equinox.launcher-debian.jar;
#LOMBOK="/usr/share/maven-repo/org/projectlombok/lombok/debian/lombok-debian.jar"
echo $LAUNCHER;
#-javaagent:$LOMBOK
#-Dsyntaxserver=true
java -jar $LAUNCHER -- --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -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.readOnly=true -Dosgi.configuration.cascaded=true -Dfile.encoding=UTF-8 -DwatchParentProcess=true -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -configuration $SERVER/config_linux $@
#-data /tmp/jdt_ws/%{ActiveProject:Name} - add this arg into the start up args in your IDE. %{ActiveProject:Name} is the var of Qt Creator, other IDEs hase other vars.
#-Dosgi.sharedConfiguration.area=#{etc}/jdtls
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Where should I put my script so that I can run it by a direct ...
It depends on who will use your script: Only you - $HOME/.local/bin (As per the XDG Base Directory Specification); You and other local...
Read more >Add a bash script to path - linux - Stack Overflow
Try this: Save the script as apt-proxy (without the .sh extension) in some directory, like ~/bin . Add ~/bin to your PATH ,...
Read more >Get Bash Script Location From Within the Script - Baeldung
In this article, we discuss how we can acquire a Bash script's location from inside that script. We begin by examining different methods...
Read more >Where is a good permanent place to install custom Bash scripts?
/usr/local/ is really the right place, while /opt is really for third party applications; " ...
Read more >How to Write a Basic Shell Script - IONOS
1. Move the shell script to a directory that is already in your PATH · 2. Add the shell script's directory to your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I solved the read-only configuration issue by adding
-Dosgi.checkConfiguration=true -Dosgi.sharedConfiguration.area=#{etc}/jdtls -Dosgi.sharedConfiguration.area.readOnly=true -Dosgi.configuration.cascaded=trueas Java properties. These properties make the execution ofjdtlspackage manager friendly and should be included in the script as well.Thanks, added.