• Stars
    star
    1,410
  • Rank 33,133 (Top 0.7 %)
  • Language
    Java
  • License
    Eclipse Public Li...
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Java language server

Build Status

Eclipse JDT Language Server

The Eclipse JDT Language Server is a Java language specific implementation of the Language Server Protocol and can be used with any editor that supports the protocol, to offer good support for the Java Language. The server is based on:

  • Eclipse LSP4J, the Java binding for the Language Server Protocol,
  • Eclipse JDT, which provides Java support (code completion, references, diagnostics...),
  • M2Eclipse, which provides Maven support,
  • Buildship, which provides Gradle support.

Features

  • Supports compiling projects from Java 1.5 through 19
  • Maven pom.xml project support
  • Gradle project support (with experimental Android project import support)
  • Standalone Java files support
  • As-you-type reporting of syntax and compilation errors
  • Code completion
  • Javadoc hovers
  • Organize imports
  • Type search
  • Code actions (quick fixes, source actions & refactorings)
  • Code outline
  • Code folding
  • Code navigation
  • Code lens (references/implementations)
  • Code formatting (on-type/selection/file)
  • Code snippets
  • Highlights (semantic highlighting)
  • Semantic selection
  • Diagnostic tags
  • Call Hierarchy
  • Type Hierarchy
  • Annotation processing support (automatic for Maven projects)
  • Automatic source resolution for classes in jars with maven coordinates
  • Extensibility

Installation

There are several options to install eclipse.jdt.ls:

  • Download and extract a milestone build from http://download.eclipse.org/jdtls/milestones/
  • Download and extract a snapshot build from http://download.eclipse.org/jdtls/snapshots/
  • Under some Linux distributions you can use the package manager. Search the package repositories for jdtls or eclipse.jdt.ls.
  • Build it from source. Clone the repository via git clone and build the project via JAVA_HOME=/path/to/java/11 ./mvnw clean verify. Optionally append -DskipTests=true to by-pass the tests. This command builds the server into the ./org.eclipse.jdt.ls.product/target/repository folder.

Some editors or editor extensions bundle eclipse.jdt.ls or contain logic to install it. If that is the case, you only need to install the editor extension. For example for Visual Studio Code you can install the Extension Pack for Java and it will take care of the rest.

Running from the command line

If you built eclipse.jdt.ls from source, cd into ./org.eclipse.jdt.ls.product/target/repository. If you downloaded a milestone or snapshot build, extract the contents.

To start the server in the active terminal, adjust the following command as described further below and run it:

java \
	-Declipse.application=org.eclipse.jdt.ls.core.id1 \
	-Dosgi.bundles.defaultStartLevel=4 \
	-Declipse.product=org.eclipse.jdt.ls.core.product \
	-Dlog.level=ALL \
	-Xmx1G \
	--add-modules=ALL-SYSTEM \
	--add-opens java.base/java.util=ALL-UNNAMED \
	--add-opens java.base/java.lang=ALL-UNNAMED \
	-jar ./plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar \
	-configuration ./config_linux \
	-data /path/to/data
  1. Choose a value for -configuration: this is the path to your platform's configuration directory. For Linux, use ./config_linux. For windows, use ./config_win. For mac/OS X, use ./config_mac.
  2. Change the filename of the jar in -jar ./plugins/... to match the version you built or downloaded.
  3. Choose a value for -data: An absolute path to your data directory. eclipse.jdt.ls stores workspace specific information in it. This should be unique per workspace/project.

If you want to debug eclipse.jdt.ls itself, add -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044 right after java and ensure nothing else is running on port 1044. If you want to debug from the start of execution, change suspend=n to suspend=y so the JVM will wait for your debugger prior to starting the server.

Running from command line with wrapper script

There is also a Python wrapper script available that makes the start up of eclipse.jdt.ls more convenient (no need to juggle with Java options etc.). A sample usage is described below. The script requires Python 3.9.

./org.eclipse.jdt.ls.product/target/repository/bin/jdtls \
	-configuration ~/.cache/jdtls \
	-data /path/to/data

All shown Java options will be set by the wrapper script. Please, note that the -configuration options points to a user's folder to ensure that the configuration folder in org.eclipse.jdt.ls.product/target/repository/config_* remains untouched.

Development Setup

See Contributing

Managing connection types

The Java Language server supports sockets, named pipes, and standard streams of the server process to communicate with the client. Client can communicate its preferred connection methods by setting up environment variables or alternatively using system properties (e.g. -DCLIENT_PORT=...)

  • To use a plain socket, set the following environment variables or system properties before starting the server:

    • CLIENT_PORT: the port of the socket to connect to
    • CLIENT_HOST: the host name to connect to. If not set, defaults to localhost.

    The connection will be used for in and output.

  • To use standard streams(stdin, stdout) of the server process do not set any of the above environment variables and the server will fall back to standard streams.

For socket and named pipes, the client is expected to create the connections and wait for the server to connect.

Feedback

Clients

This repository only contains the server implementation. Here are some known clients consuming this server:

Continuous Integration Builds

Our CI server publishes the server binaries to http://download.eclipse.org/jdtls/snapshots/.

P2 repositories are available under http://download.eclipse.org/jdtls/snapshots/repository/.

Milestone builds are available under http://download.eclipse.org/jdtls/milestones/.

License

EPL 2.0, See LICENSE file.

More Repositories

1

mosquitto

Eclipse Mosquitto - An open source MQTT broker
C
7,649
star
2

che

Kubernetes based Cloud Development Environments for Enterprise Teams
TypeScript
6,868
star
3

jetty.project

Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
Java
3,655
star
4

paho.mqtt.android

MQTT Android
Java
2,708
star
5

paho.mqtt.golang

Go
2,381
star
6

eclipse-collections

Eclipse Collections is a collections framework for Java with optimized data structures and a rich, functional and fluent API.
Java
2,283
star
7

paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
Java
2,095
star
8

paho.mqtt.python

paho.mqtt.python
Python
1,946
star
9

sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
1,902
star
10

paho.mqtt.c

An Eclipse Paho C client library for MQTT for Windows, Linux and MacOS. API documentation: https://eclipse.github.io/paho.mqtt.c/
C
1,736
star
11

mraa

Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.
C
1,349
star
12

paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)
C
1,307
star
13

openvsx

An open-source registry for VS Code extensions
Java
1,181
star
14

paho.mqtt.javascript

paho.mqtt.javascript
JavaScript
1,145
star
15

paho.mqtt.cpp

C++
976
star
16

milo

Eclipse Miloâ„¢ - an open source implementation of OPC UA (IEC 62541).
Java
976
star
17

omr

Eclipse OMRâ„¢ Cross platform components for building reliable, high performance language runtimes
C++
917
star
18

xtext

Eclipse Xtextâ„¢ is a language development framework
Java
715
star
19

upm

UPM is a high level repository that provides software drivers for a wide variety of commonly used sensors and actuators. These software drivers interact with the underlying hardware platform through calls to MRAA APIs.
C++
651
star
20

microprofile

Repository for important documentation - the index to the project / community
Java
635
star
21

californium

CoAP/DTLS Java Implementation
Java
620
star
22

leshan

Java Library for LWM2M
Java
614
star
23

paho.mqtt-spy

mqtt-spy is an open source desktop & command line utility intended to help you with monitoring activity on MQTT topics
Java
605
star
24

steady

Analyses your Java applications for open-source dependencies with known vulnerabilities, using both static analysis and testing to determine code context and usage for greater accuracy. https://eclipse.github.io/steady/
Java
518
star
25

sprotty

A diagramming framework for the web
TypeScript
514
star
26

paho.mqtt.m2mqtt

C#
513
star
27

jifa

🔬 Online Heap Dump, GC Log, Thread Dump & JFR File Analyzer.
Java
509
star
28

buildship

The Eclipse Plug-ins for Gradle project.
Java
507
star
29

lsp4j

A Java implementation of the language server protocol intended to be consumed by tools and language servers implemented in Java.
Java
473
star
30

kura

Eclipse Kuraâ„¢ project
Java
469
star
31

wakaama

Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
C
465
star
32

streamsheets

An open-source tool for processing stream data using a spreadsheet-like interface.
JavaScript
449
star
33

paho.mqtt.rust

paho.mqtt.rust
Rust
422
star
34

hawkbit

Eclipse hawkBitâ„¢
Java
416
star
35

eclipse-collections-kata

Eclipse Collections Katas
Java
411
star
36

hono

Eclipse Honoâ„¢ Project
Java
378
star
37

repairnator

Software development bots for Github. Join the bot revolution! 🌟🤖🌟💞
Java
370
star
38

ponte

Ponte Project
JavaScript
360
star
39

birt

Eclipse BIRTâ„¢ The open source reporting and data visualization project.
Java
355
star
40

paho.golang

Go libraries
Go
324
star
41

rdf4j

Eclipse RDF4J: scalable RDF for Java
Java
323
star
42

paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
C++
313
star
43

lemminx

XML Language Server
Java
255
star
44

vorto

Vorto Project
Java
221
star
45

tahu

Eclipse Tahu addresses the existence of legacy SCADA/DCS/ICS protocols and infrastructures and provides a much-needed definition of how best to apply MQTT into these existing industrial operational environments.
Java
220
star
46

kapua

Java
218
star
47

elk

Eclipse Layout Kernel - Automatic layout for Java applications.
Java
211
star
48

jnosql

Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.
Java
210
star
49

corrosion

Eclipse Corrosion - Rust edition in Eclipse IDE
Java
199
star
50

capella

Open Source Solution for Model-Based Systems Engineering
Java
197
star
51

dirigible

Eclipse Dirigibleâ„¢ Project
JavaScript
196
star
52

microprofile-config

MicroProfile Configuration Feature
Java
182
star
53

wildwebdeveloper

Simple and productive Web Development Tools in the Eclipse IDE
Java
181
star
54

pdt

PHP Development Tools project (PDT)
PHP
178
star
55

org.aspectj

Java
172
star
56

xacc

XACC - eXtreme-scale Accelerator programming framework
C++
137
star
57

thingweb.node-wot

thingweb.node-wot
TypeScript
130
star
58

microprofile-rest-client

MicroProfile Rest Client
Java
124
star
59

tycho

Tycho project repository (tycho)
Java
119
star
60

microprofile-conference

Microprofile.io Demo Code - Web Services Conference Application
Java
117
star
61

microprofile-fault-tolerance

microprofile fault tolerance
Java
115
star
62

microprofile-samples

Micro Profile Samples
Java
115
star
63

xtext-core

xtext-core
Java
114
star
64

microprofile-open-api

Microprofile open api
Java
112
star
65

gef

Eclipse GEFâ„¢
Java
111
star
66

jbom

Java
109
star
67

transformer

Eclipse Transformer provides tools and runtime components that transform Java binaries, such as individual class files and complete JARs and WARs, mapping changes to Java packages, type names, and related resource names.
Java
108
star
68

paho.mqtt.testing

An Eclipse Paho project - a Python broker for testing
Python
104
star
69

tinydtls

Eclipse tinydtls
C
102
star
70

xtext-xtend

xtext-xtend
Java
100
star
71

microprofile-graphql

microprofile-graphql
Java
98
star
72

microprofile-lra

microprofile-lra
Java
97
star
73

microprofile-health

microprofile-health
Java
95
star
74

microprofile-metrics

microprofile-metrics
Java
94
star
75

kuksa.val

kuksa.val
C++
93
star
76

sw360

SW360 project
Java
92
star
77

microprofile-jwt-auth

Java
92
star
78

mosaic

Eclipse MOSAIC is a Multi-Domain and Multi-Scale Simulation Framework for Automated and Connected Mobility Scenarios.
Java
88
star
79

nebula

Nebula Project
Java
84
star
80

microprofile-reactive-streams-operators

Microprofile project
Java
79
star
81

mosquitto.rsmb

Mosquitto rsmb
C
75
star
82

microprofile-starter

MicroProfile project generator source code
Java
69
star
83

aCute

Eclipse aCute - C# edition in Eclipse IDE
Java
65
star
84

ditto-examples

Eclipse Dittoâ„¢: Digital Twin framework - Examples
Java
63
star
85

epsilon

Epsilon is a family of Java-based scripting languages for automating common model-based software engineering tasks, such as code generation, model-to-model transformation and model validation, that work out of the box with EMF (including Xtext and Sirius), UML (including Cameo/MagicDraw), Simulink, XML and other types of models.
Java
61
star
86

lsp4e

Language Server Protocol support in Eclipse IDE
Java
60
star
87

tm4e

TextMate support in Eclipse IDE
Java
60
star
88

californium.tools

Californium project
Java
59
star
89

microprofile-reactive-messaging

Java
59
star
90

microprofile-opentracing

microprofile-opentracing
Java
57
star
91

eclemma

🌘 Java Code Coverage for Eclipse IDE
Java
57
star
92

texlipse

Eclipse Texlipse
Java
56
star
93

mita

mita
Xtend
55
star
94

dartboard

Dart Plugin for Eclipse
Java
55
star
95

jnosql-databases

This project contains Eclipse JNoSQL databases
Java
54
star
96

windowbuilder

Eclipse Windowbuilder
Java
54
star
97

xtext-eclipse

xtext-eclipse
Java
49
star
98

adore

Eclipse ADORe is a ROS based modular software library and toolkit for decision making, planning, control and simulation of automated vehicles supporting CARLA and SUMO.
Makefile
48
star
99

packages

IoT Packages project
Smarty
46
star
100

amlen

Message Broker for IoT/Mobile/Web. Mainly uses MQTT v3.x and v5. Aims to be easy to use, scalable and reliable
C
46
star