Written by Chau Truong Long
- Email: truonglongchau@gmail.com
Remote Desktop is a Java desktop application for lightweight peer-to-peer remote control and chat. It allows one machine to host a session and another machine to connect, view the remote screen, control mouse and keyboard input, exchange chat messages, send files, and inspect hardware information such as CPU, RAM, and drive usage.
The project is built with classic Java desktop technologies and keeps the architecture intentionally simple:
- Swing for the desktop GUI
- Java RMI for remote desktop control and hardware queries
- TCP sockets for connection authentication and chat/file transfer
Robotfor screen capture and input injectionOperatingSystemMXBeanfor hardware metrics
- Remote desktop streaming with mouse and keyboard control
- Client/server connection workflow with password-based authentication
- Live chat between connected peers
- File transfer inside the active session
- Hardware monitor dialog for CPU, RAM, swap, and drive information
- Multiple quality presets for streaming
- Windows executable packaging through Launch4j
The codebase is organized into a few clear areas:
src/main/java/com/guiSwing frames, panels, shared UI styles, and reusable UI helperssrc/main/java/com/busTransport and coordination logic for TCP, RMI, and chat messagingsrc/main/java/com/modelShared serializable data models and enumssrc/main/java/Application.javaApplication entry point
At runtime:
- The server starts a TCP listener and an RMI service.
- The client authenticates over TCP.
- Chat and file transfer use the socket connection.
- Remote desktop frames and hardware info are requested over RMI.
This version includes a more modern Java codebase and several performance-oriented updates:
- Java 26 project target and updated build metadata
- Immutable records and sealed message types in the shared model layer
- Better streaming efficiency through server-side scaling and tuned JPEG compression
- Frame pacing and mouse-event throttling for smoother remote control
- Shared UI helper utilities for background tasks, EDT updates, and error handling
- Safer Swing threading during session cleanup and async UI work
- JDK 26 or newer for the real project build
- Maven 3.9+
Build the project:
mvn clean packageRun the shaded jar:
java -jar target/remote-desktop-1.0.0.jarThe Maven build is configured to enforce Java 26+.
- Open the
Servertab. - Choose a local IP address or keep
0.0.0.0. - Enter the listening port and a password.
- Click
Start listening. - Share the host, port, and password with the remote client.
- Open the
Clienttab. - Enter the remote host IP or hostname.
- Enter the port and password from the server.
- Choose streaming quality.
- Click
Connect now.
- Use the remote window for desktop control
- Open the hardware monitor from the remote session menu bar
- Use the chat panel to send messages and files
src/main/java
├── Application.java
├── com/bus
│ ├── chat
│ ├── common
│ ├── rmi
│ └── tcp
├── com/gui
│ ├── chat
│ ├── client
│ ├── common
│ ├── remote
│ └── server
└── com/model
- The application is designed for LAN-style direct connections.
- A true Java 26 build requires a local JDK 26 installation.
- If you want to package the Windows executable, use the Maven package phase so the Launch4j configuration runs as part of the build.


