🟪 TommyBox is a single-file executable that makes it possible to launch web apps on a desktop.

Overview

🍥 TommyBox

License MIT Version 2.14.1 Powered by Tommy

TommyBox Demo App

About:

TommyBox is a standalone executable container that makes it possible to launch static and dynamic web apps on a desktop by providing built-in server and browser functionality.
TommyBox is similar to Electron and NW.js.

An app can be provided as a directory or packed as WAR (or ZIP) archive that can contain JSP, servlets, and static stuff like CSS, JavaScript, etc.

Under the hood, TommyBox is built on top of Tommy web server and SWT browser widget. App can be packed as WAR or ZIP archive and can optionally contain PWA manifest, JSP, servlets and all static stuff like CSS, JavaScript files etc.

See TommyBox in action: https://github.com/xnbox/tommybox_demo

Download:

Latest release: tb-2.14.1.jar

Features:

  • Single cross-platform executable jar (starts from ~25Mb)
  • No dependencies
  • No installation
  • No own configuration files, instead, TommyBox uses standard standard PWA webmanifest and standard Tomcat configuration files
  • Operating systems:
    • Linux
    • macOS
    • Windows
  • Architectures:
    • x86_64
    • win32-x86_64
    • aarch64
    • ppc64le
  • Supports custom command line args, stdin, stdout, stderr
  • Configurable display modes:
    • in-window
    • in-browser
    • fullscreen
    • headless
  • Single and multiple windows modes
  • Optional custom splash screen
  • Optional custom context menu
  • Optional custom system tray icon with custom menu

Supported web apps:

  • WAR files
  • Web apps packed as ZIP archives (including standard password-protected ZIPs)
  • Exploded web apps (local directories)
  • Remote WAR / ZIP files (on HTTP servers)
  • Embedded WAR / ZIP files and directories

Command line:

java -jar tb.jar [options] [custom arg1] [custom arg2] ...

Options:
  --help                   print help message
  --app <file | dir | URL> run app from ZIP (or WAR) archive, directory or URL
  --password <password>    provide password (for encrypted ZIP (or WAR) archive)

Run app:

Run ZIP (or WAR) file:

java -jar tb.jar --app MyKillerApp.war

Run ZIP (or WAR) file with custom command-line args:

java -jar tb.jar --app MyKillerApp.war myparam1 myparam2 ...

Run ZIP (or WAR) from web server:

java -jar tb.jar --app https://example.com/MyKillerApp.zip

Run exploded web app from directory:

java -jar tb.jar --app MyKillerAppDir

Run password-protected ZIP (or WAR) archive:

java -jar tb.jar --app MyKillerApp.zip --password mysecret

Embed app:

  • Option 1. Copy your app content into the /app directory of the tb.jar.
  • Option 2. Pack your app as app.war or app.zip (the archive can be encrypted) and copy the archive to the root directory of the tb.jar.

Brand your app by renaming the tb.jar to the MyKillerApp.jar.

Run embedded app:

java -jar MyKillerApp.jar

Run embedded app with custom command-line args:

java -jar MyKillerApp.jar myparam1 myparam2 ...

Run password-protected embedded app:

java -jar MyKillerApp.jar --password mysecret

Run password-protected embedded app with custom command-line args:

java -jar MyKillerApp.jar --password mysecret myparam1 myparam2 ...

TommyBox specific PWA manifest keys:


Key Type Default value Description
display string standalone Standard PWA display mode.
Possible values:
standalone
minimal_ui
browser
fullscreen
minimized_window (non-standard)
maximized_window (non-standard)
desktop_area (non-standard)
headless (non-standard)
enable_fullscreen boolean true Allow fullscreen mode
tray_icon boolean true Tray icon
window_buttons array ["minimize", "maximize", "close"] Window buttons list.
Possible elements:
minimize
maximize
close
window_menu string none Window menu mode.
Possible values:
custom
native
none
window_always_on_top boolean false Always on top window property
window_size string null Window size as string Eg.: 640x480
window_x number null Window location X coordinate (in pixels)
window_y number null Window location Y coordinate (in pixels)
strings array [] I18N dictionary for custom strings

TommyBox specific URL protocols:


Protocol Description HTML Example
home: Home action <a href="home:">Home</a>
back: Back action <a href="back:">Back</a>
forward: Forward action <a href="forward:>Forward</a>
reload: Reload action <a href="reload:">Reload</a>
quit: Exit to OS <a href="quit:">Exit</a>
minimize: Minimize window <a href="minimize:">Minimize</a>
fullscreen: Switch to fullscreen <a href="fullscreen:">Fullscreen</a>
open: Open the given URL in OS <a href="open:file://home/john/my.pdf">Open PDF</a>
open_in_new_window: Open the given URL in the new window <a href="open_in_new_window:http://example.com">Open in New Window</a>
open_in_browser: Open the given URL in the browser <a href="open_in_browser:http://example.com">Open in Browser</a>
java: Launch Java code <a href="java:javax.swing.JOptionPane.showMessageDialog(null, \"Hello, Java!\")">Launch Java Code</a>
js: Launch JavaScript code <a href="js:javax.swing.JOptionPane.showMessageDialog(null, 'Hello, JavaScript!')">Launch JavaScript Code</a>

Access to the custom command-line args and system streams programmatically (JNDI):

// ...somewhere in your Servlet or JSP

InitialContext ctx = new InitialContext();

/* get custom command-line args */
String[] args = (String[]) ctx.lookup("java:comp/env/tommy/args");

/* get standard input (stdin) */
InputStream stdin = (InputStream) ctx.lookup("java:comp/env/tommy/stdin");

/* get standard output (stdout) */
PrintStream stdout = (PrintStream) ctx.lookup("java:comp/env/tommy/stdout");

/* get standard error (stderr) */
PrintStream stderr = (PrintStream) ctx.lookup("java:comp/env/tommy/stderr");

/* get "--app" parameter value */
String app = (String) ctx.lookup("java:comp/env/tommy/app");

// ...

F.A.Q.

Q. My app failed with java.lang.ClassNotFoundException: javax.servlet.*

A. As a result of the move from Java EE to Jakarta EE, starting from v10, Apache Tomcat supports only the Jakarta EE spec. javax.servlet.* is no longer supported. Replace the javax.servlet.* imports in your code with jakarta.servlet.*.

You might also like...

Unofficial Clubhouse web app client. For personal use only. It's a personal open-source project and not affiliated with any company.

Unofficial Clubhouse web app client. For personal use only. It's a personal open-source project and not affiliated with any company.

Purpose of this web app That's a personal project and not affiliated with any company. This is the web client app to make your Club House experience b

Nov 15, 2022

Arkhota, a web brute forcer for Android.

Arkhota, a web brute forcer for Android.

Arkhota, a web brute forcer for Android What? Arkhota is a web (HTTP/S) brute forcer for Android. Why? A web brute forcer is always in a hacker's comp

Jan 6, 2023

2211-01-a-OMW2PCAFYB's Web Checkers Project

WC-2211-01-a-OMW2PCAFYB 2211-01-a-OMW2PCAFYB's Web Checkers Project This is the Web Checkers Project as established by SWEN-261 @ RIT Link to page: ht

Oct 21, 2021

Anonymous chatting web app

Anonymous chatting web app

Innogl This project is an anonymous web and video chat with strangers. Users can choose an online companion to discuss anything, find new friends or d

Oct 22, 2022

ByteSkriptQuery - A library for deploying ByteSkript as a backend web technology.

ByteSkriptQuery - A library for deploying ByteSkript as a backend web technology.

ByteSkriptQuery A language library for ByteSkript that allows it to be deployed as a backend web language. Not only does this allow the creation of ad

Jan 4, 2022

A Java program for web spidering.

JSpider JSpider is an advanced, multi-threaded Java library for crawling websites. It can be used as a command line program with all it's primary feat

Nov 5, 2022

Bridging IOTA's self-sovereign identities to existing "Web 2.0" OAuth solutions

Bridging IOTA's self-sovereign identities to existing

IOTA Identity Provider Bridging IOTA's self-sovereign identities to existing "Web 2.0" OAuth solutions. NOTE: This plugin has NOT been audited or test

Nov 7, 2022

A powerful open source test automation platform for Web Apps, Mobile Apps, and APIs

A powerful open source test automation platform for Web Apps, Mobile Apps, and APIs

A powerful open source test automation platform for Web Apps, Mobile Apps, and APIs. Build stable and reliable end-to-end tests @ DevOps speed.

Dec 31, 2022

Sometimes people say that playing on anarchy servers far away from spawn is like Singleplayer with chat, so this mod just makes the exact thing possible.

Singleplayer With Chat Sometimes people say that playing on anarchy servers far away from spawn is like singleplayer with chat, so this mod just makes

Dec 2, 2022

Library that makes it possible to read, edit and write CSV files

Library that makes it possible to read, edit and write CSV files

AdaptiveTableLayout Welcome the new CSV Library AdaptiveTableLayout for Android by Cleveroad Pay your attention to our new library that makes it possi

Jan 6, 2023

This is a Velocity plugin that makes it possible to host a modern forge server behind a Velocity proxy!

Ambassador This is a Velocity plugin that makes it possible to host a modern forge server behind a Velocity proxy! Unlike other solutions, this plugin

Dec 28, 2022

UniFi Proxy makes it possible to integrate third-party hardware into UniFi Protect

UniFi Proxy makes it possible to integrate third-party hardware into UniFi Protect

UniFi Proxy UniFi Proxy makes it possible to integrate third-party hardware into UniFi Protect. For testing purposes only, it is recommended to purcha

Dec 27, 2022

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Jan 2, 2023

Executable state charts, workflows and more.

Executable state charts, workflows and more.

Act Getting started If you are using Maven, include the following in your POM: dependency groupIdorg.requirementsascode.act/groupId a

Dec 30, 2022

An evil RMI server that can launch an arbitrary command. May be useful for CVE-2021-44228

evil-rmi-server An evil RMI server that can launch an arbitrary command. May be useful for CVE-2021-44228 in a local privesc scenario Build ./gradlew

Nov 9, 2022

Java library to launch external processes

ch.vorburger.exec If you like/use this project, a Star / Watch / Follow me on GitHub is appreciated! This project is a small library allowing to launc

Sep 7, 2022

A singular file to protect as many Minecraft servers and clients as possible from the Log4j exploit (CVE-2021-44228).

MC-Log4J-Patcher The goal of this project is to provide Minecraft players, and server owners, peace of mind in regards to the recently discovered Log4

Jan 4, 2022

An evolving set of open source web components for building mobile and desktop web applications in modern browsers.

Vaadin components Vaadin components is an evolving set of high-quality user interface web components commonly needed in modern mobile and desktop busi

Dec 31, 2022
Releases(v2.14.2)
log4j2-scan is a single binary command-line tool for CVE-2021-44228 vulnerability scanning and mitigation patch

log4j2-scan is a single binary command-line tool for CVE-2021-44228 vulnerability scanning and mitigation patch. It also supports nested JAR file scan

Logpresso GitHub 839 Dec 29, 2022
JSON Web Token (JWT) implementation for Java with support for signatures (JWS), encryption (JWE) and web keys (JWK).

Nimbus JOSE+JWT Nimbus JOSE+JWT is a popular open source (Apache 2.0) Java library which implements the Javascript Object Signing and Encryption (JOSE

Connect2ID 35 Jul 1, 2022
A desktop java GUI application to encrypt your plain text

A desktop java GUI application to encrypt your plain text

Nikhil Narayanan 4 Sep 10, 2022
KeepMyPassword for Desktop - keep your passwords locally and secure.

KeepMyPassword is an open-source project under MIT license. Its aim is to provide a REAL secure place to store all your sensitive data. Everything is stored locally on your device. No one apart from YOU will ever have access to your passwords. Code is available to see whenever you need it.

Adrian Goral 35 Dec 15, 2022
evilzip lets you create a zip file(with password) that contains files with directory traversal characters in their embedded path.

evilzip logs 20210701 修改权限问题,让解压后的文件默认就有读写执行的权限。 About evilzip lets you create a zip file(with password) that contains files with directory traversal

鸭王 87 Dec 11, 2022
Java JWT: JSON Web Token for Java and Android

Java JWT: JSON Web Token for Java and Android JJWT aims to be the easiest to use and understand library for creating and verifying JSON Web Tokens (JW

null 8.8k Dec 30, 2022
Jwks RSA - JSON Web Key Set parser.

jwks-rsa Install Maven <dependency> <groupId>com.auth0</groupId> <artifactId>jwks-rsa</artifactId> <version>0.17.0</version> </dependency>

Auth0 158 Dec 30, 2022
JAP is an open source authentication middleware, it is highly decoupled from business code and has good modularity and flexiblity. Developers could integrate JAP into web applications effortlessly.

?? JAP 是什么? JAP 是一款开源的登录中间件,基于模块化设计,并且与业务高度解耦,使用起来非常灵活,开发者可以毫不费力地将 JAP 集

Fujie 140 Dec 1, 2022
一个轻量级Web蜜罐 - A Little Web Honeypot.🍯🍯🍯🐝🐝🐝

Loki Releases下载:https://github.com/TheKingOfDuck/Loki/releases/tag/0.1 更新日志 20210107 实现多端口监听 20210103 实现动态配置相关页面 20210124 实现配置指定端口指向指定模板文件 20210131 捕获

鸭王 150 Dec 5, 2022