question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Put this bash script into the appropriate location

See original GitHub issue

It’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:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
schrieveslaachcommented, Jan 18, 2022

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=true as Java properties. These properties make the execution of jdtls package manager friendly and should be included in the script as well.

0reactions
KOLANICHcommented, Jan 18, 2022

Thanks, added.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found