The simplest way to install and launch Eclipse's JDTLS!!
- Java 17+ (available in path)
- Linux, MacOS or WSL
Important: uninstall any previous installation.
- Script will be installed to
~/.local/opt/jdtls-launcher
- A symlink called
jdtls
will be created in~/.local/bin/jdtls
- Run the installation script:
curl https://raw.githubusercontent.com/eruizc-dev/jdtls-launcher/master/install.sh | bash
- Add
~/.local/bin
to your path# .bashrc, .zshrc or whatever shell you use export PATH=$PATH:$HOME/.local/bin
Append -s /path/to/dir
to the installation command
- A directory called
jdtls-launcher
will be created inside that directory - A symlink will still be created to the same location
- Download source code from releases or directly from the master branch
- Unzip it and place
jdtls-launcher.sh
script in your desired install location - Run the script with
--install
option to install jdtls and lombook alongside the script in a directory calledjdtls
(user must have write permissions) - Run the script
jdtls-launcher.sh
without arguments to start the language server
To update jdtls and lombook it's as simple as jdtls --update
You can always check what version you have installed with jdtls --version
command.
To update jdtls-launcher you have to manually uninstall and reinstall
Remove symlink and jdtls-launcher
directory with rm -rf
.
- Symlink locations can be found using
where jdtls
orwhich jdtls
- Install location can be found using
dirname $(realpath jdtls)
Neovim with lspconfig
Add the following to your init.vim
lua require'lspconfig'.jdtls.setup{
\ cmd = { 'jdtls' },
\ root_dir = function(fname)
\ return require'lspconfig'.util.root_pattern('pom.xml', 'gradle.build', '.git')(fname) or vim.fn.getcwd()
\ end
\}