• This repository has been archived on 26/Mar/2024
  • Stars
    star
    1,230
  • Rank 36,518 (Top 0.8 %)
  • Language
    Kotlin
  • License
    Other
  • Created almost 4 years ago
  • Updated 3 months ago

Reviews

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

Repository Details

Server-side library for running Swing applications remotely

projector-server

JetBrains incubator project Tests status badge

Server-side library for running Swing applications remotely.

Documentation | Issue tracker

The state of Projector

The development of JetBrains Projector as its own standalone product has been suspended. That said, Projector remains an important part of JetBrains Gateway, which is the primary remote development tool for JetBrains IDEs. We will focus our efforts on improving and developing Projector in this limited scenario.

Our goal is to provide a rich, full-featured remote development experience with a look and feel that is equal to or better than what you get when working with IDEs locally. The only way to get everything youโ€™re used to having when working locally (low latency, low network traffic, user-defined and OS-specific shortcuts, themes, settings migrations, ssh-agent/port forwarding, and other things) is by installing a dedicated client-side application. The standalone version of Projector is not capable of meeting these goals.

As a result, we no longer recommend using the standalone version of JetBrains Projector or merely making tweaks to incorporate it into your existing IDE servers. We wonโ€™t provide user support or quick-fixes for issues that arise when these setups are used. If you have the option to switch from Projector to Gateway, we strongly recommend you do so.

Learn more about JetBrains Gateway

Building

The following command creates a zip file with the whole runtime classpath:

./gradlew :projector-server:distZip

You can find the file here: /<project-root>/projector-server/build/distibution/projector-server-<server-version>.zip.

By default, a proper revision of projector-client:projector-common at GitHub will be used as a dependency. If you want to use local projector-client, please specify a special local property useLocalProjectorClient=true as a line in local.properties file ( create this file if you don't have one). You can find an example in local.properties.example file. After specifying this property and reloading Gradle build script, local projector-client from ../projector-client will be used as the dependency.

to use the local projector-client, the folders must be located as follows:

.
โ”œโ”€โ”€ projector-client
โ”œโ”€โ”€ projector-server

How to run my application using this?

There are two ways.

Not modifying your application code

This is the recommended way. You can use it if you don't have any preference. You don't need to rebuild your app at all here.

In the projector-server project, there is a ProjectorLauncher main class. It sets headless stuff up itself and then calls another main class. The name of the class-to-launch is obtained from the System Properties and program arguments are passed to the main of the class-to-launch without changing.

Extract libs folder from projector-server-VERSION.zip to add it to classpath later.

To launch your app, change your run script like this:

java \
 -classpath YOUR_USUAL_CLASSPATH:libs/* \
 -Dorg.jetbrains.projector.server.classToLaunch=YOUR_USUAL_MAIN_CLASS \
 org.jetbrains.projector.server.ProjectorLauncher \
 YOUR_USUAL_MAIN_ARGUMENTS

As you see, you should add the libs folder to you classpath. Also, you should change the main class to the ProjectorLauncher but pass your original main class as a special System Property.

We have an example in our demo app called projector-demo.

Also, we've tested this variant with IntelliJ IDEA. Just download it from the download page and only change the idea.sh script. In the end of default script, the are lines like the following:

...
CLASS_PATH="$CLASS_PATH:$IDE_HOME/lib/jnr-posix-3.0.50.jar"

# ---------------------------------------------------------------------
# Run the IDE.
# ---------------------------------------------------------------------
IFS="$(printf '\n\t')"
# shellcheck disable=SC2086
"$JAVA_BIN" \
  -classpath "$CLASS_PATH" \
  ${VM_OPTIONS} \
  "-XX:ErrorFile=$HOME/java_error_in_idea_%p.log" \
  "-XX:HeapDumpPath=$HOME/java_error_in_idea_.hprof" \
  "-Djb.vmOptionsFile=${USER_VM_OPTIONS_FILE:-${VM_OPTIONS_FILE}}" \
  ${IDE_PROPERTIES_PROPERTY} \
  -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.strict.classpath=true -Didea.vendor.name=JetBrains -Didea.paths.selector=IdeaIC2022.1 -Didea.platform.prefix=Idea -Didea.jre.check=true -Dsplash=true \
  com.intellij.idea.Main \
  "$@"

You should change them to:

...
CLASS_PATH="$CLASS_PATH:$IDE_HOME/lib/jnr-posix-3.0.50.jar"
CLASS_PATH="$CLASS_PATH:$IDE_HOME/projector-server-<server-version>/lib/*"

# ---------------------------------------------------------------------
# Run the IDE.
# ---------------------------------------------------------------------
IFS="$(printf '\n\t')"
# shellcheck disable=SC2086
"$JAVA_BIN" \
  -classpath "$CLASS_PATH" --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED \
  ${VM_OPTIONS} \
  "-XX:ErrorFile=$HOME/java_error_in_idea_%p.log" \
  "-XX:HeapDumpPath=$HOME/java_error_in_idea_.hprof" \
  "-Djb.vmOptionsFile=${USER_VM_OPTIONS_FILE:-${VM_OPTIONS_FILE}}" \
  ${IDE_PROPERTIES_PROPERTY} \
  -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader -Didea.strict.classpath=true -Didea.vendor.name=JetBrains -Didea.paths.selector=IntelliJIdea2022.1 -Didea.jre.check=true -Dsplash=true \
  -Dorg.jetbrains.projector.server.classToLaunch=com.intellij.idea.Main org.jetbrains.projector.server.ProjectorLauncher \
  "$@"

Don't forget to place JARs from projector-server distribution to $IDE_HOME/projector-server-<server-version>/lib.

Also, you can find this example in projector-docker where these actions are done automatically.

Modifying your application code

Using this way, you can add a custom condition to start the server.

Add a dependency to the projector-server project to your app. In the beginning of your main, decide if you want to run the app headlessly. If yes, invoke System.setProperty("org.jetbrains.projector.server.enable", "true") and call the runProjectorServer method of the ProjectorLauncher.

When you go this way, ensure that no AWT nor Swing operations are performed before the initialization of the server. Such operations can cause some lazy operations of AWT happen and our server doesn't support that.

This way is demonstrated in projector-demo too.

Run with Gradle tasks

There are two gradle tasks for running server. They are handy when developing. To enable them, you should set some properties in local.properties file in the project root. Use local.properties.example as a reference.

  1. runServer โ€” launch your app with Projector Server. Required properties:

    • projectorLauncher.targetClassPath โ€” classpath of your application;
    • projectorLauncher.classToLaunch โ€” FQN of your application main class.
  2. runIdeaServer โ€” launch IntelliJ IDEA with Projector Server. Required property:

    • projectorLauncher.ideaPath โ€” path to IDEA's root directory.

Connection from browser

When the server is launched, you can open localhost:8887 in the browser to access the app.

Notes

Currently, projector-server supports only Linux and JetBrains Runtime 11 and 17 as JRE.

To set the port which will be used by Projector Server for WebSocket, use the -Dorg.jetbrains.projector.server.port=<port-number> System Property.

Contributing

CONTRIBUTING.md.

License

GPLv2+CPE.

More Repositories

1

kotlin

The Kotlin Programming Language.
Kotlin
45,725
star
2

intellij-community

IntelliJ IDEA Community Edition & IntelliJ Platform
16,452
star
3

compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
Kotlin
14,677
star
4

JetBrainsMono

JetBrains Mono โ€“ the free and open-source typeface for developers
Shell
10,126
star
5

ideavim

IdeaVim โ€“ A Vim engine for JetBrains IDEs
Kotlin
7,980
star
6

Exposed

Kotlin SQL Framework
Kotlin
7,869
star
7

kotlin-native

Kotlin/Native infrastructure
Kotlin
7,048
star
8

ring-ui

A collection of JetBrains Web UI components
TypeScript
3,555
star
9

kotlinconf-app

KotlinConf Schedule Application
Kotlin
2,830
star
10

intellij-platform-plugin-template

Template repository for creating plugins for IntelliJ Platform
Kotlin
2,791
star
11

skija

Java bindings for Skia
Java
2,605
star
12

create-react-kotlin-app

Create React apps using Kotlin with no build configuration
JavaScript
2,477
star
13

projector-docker

Run JetBrains IDEs remotely with Docker
Shell
2,209
star
14

intellij-plugins

Open-source plugins included in the distribution of IntelliJ IDEA Ultimate and other IDEs based on the IntelliJ Platform
Java
2,002
star
15

svg-sprite-loader

Webpack loader for creating SVG sprites.
JavaScript
1,998
star
16

skiko

Kotlin MPP bindings to Skia
C++
1,685
star
17

compose-multiplatform-ios-android-template

Compose Multiplatform iOS+Android Application project template
Kotlin
1,563
star
18

MPS

JetBrains Meta programming System
JetBrains MPS
1,500
star
19

lets-plot

Multiplatform plotting library based on the Grammar of Graphics
Kotlin
1,446
star
20

kotlin-web-site

The Kotlin programming language website
JavaScript
1,413
star
21

intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
Kotlin
1,377
star
22

phpstorm-stubs

PHP runtime & extensions header files for PhpStorm
PHP
1,297
star
23

kotlin-wrappers

Kotlin wrappers for popular JavaScript libraries
Kotlin
1,294
star
24

idea-gitignore

.ignore support plugin for IntelliJ IDEA
Kotlin
1,287
star
25

resharper-unity

Unity support for both ReSharper and Rider
C#
1,199
star
26

intellij-sdk-docs

IntelliJ SDK Platform Documentation
Markdown
1,181
star
27

xodus

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.
Java
1,155
star
28

intellij-scala

Scala plugin for IntelliJ IDEA
Scala
1,137
star
29

kotless

Kotlin Serverless Framework
Kotlin
1,124
star
30

JetBrainsRuntime

Runtime environment based on OpenJDK for running IntelliJ Platform-based products on Windows, macOS, and Linux
Java
1,118
star
31

intellij-sdk-code-samples

Mirror of the IntelliJ SDK Docs Code Samples
Java
980
star
32

js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
Java
879
star
33

android

Android Plugin for IntelliJ IDEA. This repository is a subset of https://git.jetbrains.org/?p=idea/android.git cut according to GitHub file size limitations.
Kotlin
863
star
34

projector-client

Common and client-related code for running Swing applications remotely
Kotlin
813
star
35

projector-installer

Install, configure and run JetBrains IDEs with Projector Server on Linux or in WSL
Python
810
star
36

Grammar-Kit

Grammar files support & parser/PSI generation for IntelliJ IDEA
Java
688
star
37

Arend

The Arend Proof Assistant
Java
676
star
38

amper

Amper - a build and project configuration tool with a focus on the user experience and the IDE support
Kotlin
621
star
39

markdown

Markdown parser written in kotlin
Kotlin
617
star
40

jediterm

Pure Java Terminal Emulator. Works with SSH and PTY.
Java
611
star
41

compose-multiplatform-template

Compose Multiplatform Application project template
Kotlin
603
star
42

jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Kotlin
580
star
43

Nitra

Public Nitra repository
Nemerle
549
star
44

lincheck

Framework for testing concurrent data structures
Kotlin
520
star
45

intellij-micropython

Plugin for MicroPython devices in PyCharm and IntelliJ
Python
482
star
46

kotlin-playground

Self-contained component to embed in websites for running Kotlin code
JavaScript
422
star
47

colorSchemeTool

Python
396
star
48

compose-multiplatform-desktop-template

Compose Multiplatform Desktop Application project template
Kotlin
393
star
49

lets-plot-kotlin

Grammar of Graphics for Kotlin
Kotlin
389
star
50

Qodana

๐Ÿ“ Source repository of Qodana Help
388
star
51

rd

Reactive Distributed communication framework for .NET, Kotlin, C++. Inspired by Rider IDE.
C#
373
star
52

java-annotations

Annotations for JVM-based languages.
Java
362
star
53

phpstorm-attributes

PhpStorm specific attributes
PHP
357
star
54

Unity3dRider

Unity JetBrains Rider integration
348
star
55

godot-support

C#
339
star
56

pty4j

Pty for Java
Java
338
star
57

resharper-fsharp

F# support in JetBrains Rider
F#
320
star
58

phpstorm-workshop

Code for the PhpStorm workshop
PHP
287
star
59

awesome-pycharm

A curated list of resources for learning and using PyCharm, a Python IDE from JetBrains
271
star
60

web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
TypeScript
270
star
61

meta-runner-power-pack

A set of Meta-runners for TeamCity
PowerShell
256
star
62

inspection-plugin

Gradle plugin to launch IDEA inspections
Kotlin
255
star
63

youtrack-mobile

A iOS and Android client for YouTrack
TypeScript
255
star
64

gradle-changelog-plugin

Plugin for parsing and managing the Changelog in a "keep a changelog" style.
Kotlin
252
star
65

ideolog

Interactive viewer for '.log' files.
Kotlin
250
star
66

qodana-action

โš™๏ธ Scan your Go, Java, Kotlin, PHP, Python, JavaScript, TypeScript, .NET projects at GitHub with Qodana. This repository contains Qodana for Azure, GitHub, CircleCI and Gradle
JavaScript
234
star
67

gradle-idea-ext-plugin

Plugin to store IJ settings in gradle script
Groovy
227
star
68

php-timeline

Notable events of PHP history
222
star
69

resharper-rider-samples

Simple interactive exercises to help learn ReSharper and Rider
C#
221
star
70

la-clojure

Clojure plugin for IntelliJ IDEA
Java
220
star
71

kotlin-compiler-server

Server for executing kotlin code
Kotlin
216
star
72

jdk8u_jdk

Java
210
star
73

jcef

A simple framework for embedding Chromium-based browsers into Java-based applications.
Java
206
star
74

pest-intellij

The official Pest Plugin for PhpStorm / IntelliJ IDEA
Kotlin
195
star
75

youtrack-workflows

YouTrack Custom Workflow Repository
JavaScript
194
star
76

psiviewer

PSI Viewer for IntelliJ IDEA plugin development
Java
175
star
77

svg-mixer

Node.js toolset for generating & transforming SVG images and sprites in modern way
JavaScript
173
star
78

compose-for-web-demos

Historical repository of early Compose for Web effort.
171
star
79

phpstorm-docker-images

Pre-configured Docker images used by PhpStorm team
Dockerfile
170
star
80

rider-efcore

Entity Framework Core UI plugin for JetBrains Rider
Kotlin
169
star
81

jetbrains_guide

JetBrains Guides where Developer Advocacy and the community share ideas.
CSS
168
star
82

kotlin-web-demo

Online mini-IDE for Kotlin
Kotlin
168
star
83

intellij-plugin-verifier

Compatibility verification tool for IntelliJ Platform plugins
Kotlin
165
star
84

intellij-samples

Code that demonstrates various IntelliJ IDEA features
Java
163
star
85

jdk8u_hotspot

C++
159
star
86

resharper-rider-plugin

https://www.jetbrains.com/help/resharper/sdk/
PowerShell
158
star
87

qodana-cli

๐Ÿ”ง JetBrains Qodanaโ€™s official command line tool
Go
154
star
88

teamcity-messages

Python Unit Test Reporting to TeamCity
Python
139
star
89

ruby-type-inference

Dynamic definitions and types provider for ruby static analysis
Kotlin
136
star
90

educational-plugin

Educational plugin to learn and teach programming languages such as Kotlin, Java, Python, JavaScript, and others right inside of JetBrains IntelliJ Platform based IDEs.
Kotlin
134
star
91

resharper-angularjs

ReSharper plugin for AngularJS support
JavaScript
134
star
92

clion-remote

134
star
93

golandtipsandtricks

This is an ever evolving repository for GoLand Tips&Tricks
Go
132
star
94

python-skeletons

The python-skeltons repo is deprecated: use PEP 484 and Typeshed instead
Python
132
star
95

clion-wsl

Shell
130
star
96

phpstorm-phpstan-plugin

PHPStan plugin for PhpStorm
Java
130
star
97

teamcity-docker-samples

TeamCity docker compose samples
Shell
128
star
98

phpstorm-psalm-plugin

Psalm plugin for PhpStorm
Java
126
star
99

jdk8u

Shell
123
star
100

YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
C#
123
star