GithubHelp home page GithubHelp logo

jetbrains / projector-demo Goto Github PK

View Code? Open in Web Editor NEW
35.0 13.0 11.0 107 KB

A simple sample application demonstrating running Swing applications remotely

Home Page: https://youtrack.jetbrains.com/issues/PRJ

License: GNU General Public License v2.0

Kotlin 100.00%
swing awt

projector-demo's Introduction

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.

projector-demo's People

Contributors

arti1208 avatar avvessalom avatar servb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.