Skip to content

klibio/example.bnd.rcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project description

docker_build Docker Hub Project

Overview

This projects exemplifies the development of Eclipse 4 RCP Application with bndtools. It enables

  • local development with Eclipse IDE and bndtools
  • continuous building and ProofOfPerformance (pop) with GitHub actions
  • running inside Debian based Docker container with web browser accessible UI

Multiple minimalistic Eclipse RCP project types are demonstrated

  1. headless application - targeted for terminal usage
  2. Eclipse SWT dialog UI
  3. Eclipse 4 RCP Product with SWT UI application

See the project Project for more information on using, building and more!

BrowserUI displaying Eclipse RCP applications

Local Development

Prerequisites:

Tool Version Notes
Java JDK 21 Any distribution, e.g. Eclipse Temurin. Must be on PATH or JAVA_HOME set.
Gradle wrapper ./gradlew / gradlew.bat included — no separate install required.
bnd CLI 7.3.0 biz.aQute.bnd-7.3.0.jar is committed to the workspace root — no download needed. If you need to refresh it, download from Maven Central or GitHub Releases.
Graphical display Required for the SWTBot test suite (Windows desktop or X11 on Linux).

Build

# Build all bundles
./gradlew build

# Export platform-specific products
./gradlew export.app.ui_linux.gtk.x86-64
./gradlew export.app.ui_win32.win32.x86-64
./gradlew export.app.ui_macosx.cocoa.x86-64
./gradlew export.app.ui_macosx.cocoa.aarch64

# Export all three application types for Linux (used by CI/Docker)
./gradlew export.app.ui_linux.gtk.x86-64 \
          export.12_equinoxapp_linux.gtk.x86-64 \
          export.ui_linux.gtk.x86-64

Run exported artifacts

After the export Gradle task completes, launch the product directly:

# Linux — Eclipse 4 RCP product
./example.rcp.app.ui/_export/linux.gtk.x86-64/eclipse

# Linux — Headless Equinox application
./example.rcp.headless/_export/linux.gtk.x86-64/eclipse

# Linux — SWT dialog application
./example.rcp.ui/_export/linux.gtk.x86-64/eclipse

On Windows, replace eclipse with eclipse.exe and the path token linux.gtk.x86-64 with win32.win32.x86-64.

Run the test suite (SWTBot UI tests)

The SWTBot test suite launches the full Eclipse 4 RCP application in-process and exercises it through the SWTBot API.

# Windows — from the workspace root
java -jar biz.aQute.bnd-7.3.0.jar runtests \
  example.rcp.app.ui.swtbot.tests/swtbot_win32.win32.x86-64.bndrun

# Linux / macOS — substitute the matching .bndrun when available
java -jar biz.aQute.bnd-7.3.0.jar runtests \
  example.rcp.app.ui.swtbot.tests/swtbot_*.bndrun

Note: Use bnd runtests, not bnd test or bnd run.
bnd test silently skips .bndrun files (only processes bnd.bnd project files);
bnd run does not inject the -tester bundle.

Outputs after a successful run:

Path Contents
reports/TEST-*.xml JUnit XML report (parsed by CI / IDEs)
reports/TEST-*.html Human-readable HTML summary
reports/summary.xml Run-level summary with duration
example.rcp.app.ui.swtbot.tests/screenshots/ PNG screenshots captured at key test steps

Screenshot filenames:

File Captured at
01_main_window_open.png After the main application shell becomes active
02_table_verified.png After the Sample Part table row-count assertion passes
03_before_quit.png Immediately before the File → Quit sequence

Screenshots persist across osgi.clean=true restarts because they are written outside the bnd-managed _rt/ directory (resolved from the bundle jar location: <project>/screenshots/).

Try it out (local Docker installation required)

Build the container image

# Build from source (exports all three Linux application types internally)
docker build -t klibio/example.bnd.rcp .

Launch the application container

# bash
docker container run -d \
  -p 5800:5800/tcp \
  klibio/example.bnd.rcp
# PowerShell
docker container run -d `
  -p 5800:5800/tcp `
  klibio/example.bnd.rcp

Access the UI via web browser — http://localhost:5800

  1. Connect to VNC
  2. Use the context menu (right-click the desktop) to launch applications BrowserUI showing ContextMenu

License

Licensed under the Eclipse Public License v1.0.

About

Eclipse RCP application examples with bndtools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors