Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
/ projector-demo Public archive

A simple sample application demonstrating running Swing applications remotely

License

Notifications You must be signed in to change notification settings

JetBrains/projector-demo

Repository files navigation

projector-demo

JetBrains incubator project Builds status badge

A simple sample application demonstrating running Swing applications remotely.

Documentation | Issue tracker

Building and running

We use Gradle. So you can run Gradle tasks as follows:

# example of running `build` task:
./gradlew build

App

There is OriginalMain class, which is an example of a custom Swing application. Also, there is HeadlessSupportingMain class, which demonstrates lines added to run the demo app in the headless mode.

How to run projector-demo

Here are several ways to run this demo app. Using them, you can understand how to run your own app.

Run configuration
Gradle task
Main class VM option
(UI) OriginalMain
runUiOriginalMain
org.jetbrains.projector.demo.OriginalMain Blank
(UI) HeadlessSupportingMain
runUiHeadlessSupportingMain
org.jetbrains.projector.demo.HeadlessSupportingMain Blank
(Headless) HeadlessSupportingMain
runHeadlessHeadlessSupportingMain
org.jetbrains.projector.demo.HeadlessSupportingMain -Dorg.jetbrains.projector.server.enable=true
(Headless) ProjectorLauncher
runHeadlessProjectorLauncher
org.jetbrains.projector.server.ProjectorLauncher -Dorg.jetbrains.projector.server.classToLaunch=org.jetbrains.projector.demo.OriginalMain

To access headlessly run app, you can use Projector web client. It will be available on http://localhost:8887. Or you can use any other way of connection, feel free to check the corresponding documentation page.

Artifacts

There are two run configurations. Jars will be built in the build/libs dir.

Build HeadlessSupporting jar

Gradle task: jarHeadlessSupport.

Its main class is HeadlessSupportingMain and it contains the projector-server module. To run headlessly, add a JVM option -Dorg.jetbrains.projector.server.enable=true.

Build Original jar

Gradle task: jarOriginal.

Its main class is OriginalMain.

To launch the original version with UI, run:

java \
-classpath projector-demo-original.jar \
org.jetbrains.projector.demo.OriginalMain

To launch the original version headlessly, place the classpath of projector-server into libs dir and run:

java \
-classpath projector-demo-original.jar:libs/* \
-Dorg.jetbrains.projector.server.classToLaunch=org.jetbrains.projector.demo.OriginalMain \
org.jetbrains.projector.server.ProjectorLauncher

License

GPLv2.

About

A simple sample application demonstrating running Swing applications remotely

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages