Files
rudi 09600260b5
Build and Test j3270 / Build JAR & Run Tests (push) Successful in 37s
Add some cleaning
2026-08-21 18:56:37 -04:00

103 lines
3.7 KiB
Markdown

# j3270
[![Build & Test](https://git.hugfreevikings.wtf/rudi/j3270/actions/workflows/build.yaml/badge.svg)](https://git.hugfreevikings.wtf/rudi/j3270/actions)
[![Releases](https://img.shields.io/badge/Releases-Gitea-blue.svg)](https://git.hugfreevikings.wtf/rudi/j3270/releases)
[![Java](https://img.shields.io/badge/Java-11%20%7C%2017%20%7C%2021-blue.svg)](https://adoptium.net)
[![License](https://img.shields.io/badge/License-Unlicense-blue.svg)](LICENSE)
An **x3270-aligned IBM 3270 mainframe terminal emulator** written in pure Java. Designed for high compatibility with IBM z/OS, z/VM, CMS, and TSO systems over TN3270 and TN3270E.
---
## 🚀 Quick Download & Run
### Latest Standalone JAR
You can download the ready-to-run executable JAR directly from the releases or CI builds:
- **[Download Latest Tagged Release (`j3270.jar`)](https://git.hugfreevikings.wtf/rudi/j3270/releases)**
- **[Latest Nightly CI Artifacts](https://git.hugfreevikings.wtf/rudi/j3270/actions)** (Download under the latest successful workflow run)
### Running `j3270`
Requires **Java 11 or higher** (Java 11, 17, 21+):
```bash
# Launch interactive GUI
java -jar j3270.jar
# Connect to TLS/SSL mainframe with custom port
java -jar j3270.jar -s mainframe.example.com 992
# Or using standard x3270 L: prefix
java -jar j3270.jar L:mainframe.example.com:992
# Connect via Plain TN3270 (Non-E)
java -jar j3270.jar -P mainframe.example.com 23
# Or using standard x3270 P: prefix
java -jar j3270.jar P:mainframe.example.com:23
# Connect with unverified/self-signed certificate verification bypass
java -jar j3270.jar --tls --insecure mainframe.example.com 992
# Launch with custom configuration file
java -jar j3270.jar -c config.ini
# Launch directly from source runner
./run.sh
```
---
## ✨ Features
- **TN3270 & TN3270E Protocol Support**: RFC 2355 compliant state machine, negotiation, Device-Type query, plain TN3270 fallback, and SSL/TLS encryption.
- **SSL/TLS Security**:
- Encrypted TN3270 over TLS connections on standard port `992` or custom ports.
- Interactive certificate verification prompt for self-signed or untrusted certificates with fingerprint, subject, issuer, and validity inspection.
- Optional unverified/insecure mode for testing and headless scripting.
- **IND$FILE File Transfer**: Full support for both **CUT** and **DFT (DDM)** high-speed structured field transfers with ASCII/binary translation, CRLF handling, and recfm/lrecl formatting for TSO, VM/CMS, and CICS.
- **z/VM & Line-Mode Support**: Proper SSCP-LU and unformatted line handling (`CP TERM CONMODE 3270` supported).
- **APL & Graphic Escape**: Comprehensive box-drawing and math symbol character rendering.
- **Terminal Models**:
- Model 2 (24x80)
- Model 3 (32x80)
- Model 4 (43x80)
- Model 5 (27x132)
- **Zero-Dependency Core**: Modular architecture separated into:
- `lib3270j`: Reusable Java 3270 protocol, data stream parser, charset translation, and telnet state machine.
- `j3270`: Desktop Swing user interface and session management.
---
## 🛠️ Building from Source
### Standalone Build (No Gradle Required)
The project includes self-contained, portable build scripts:
```bash
# Build executable JAR in 2 seconds:
sh ./build_all.sh
# Run all 57 automated unit tests in ~500ms:
sh ./test_all.sh
```
The resulting standalone JAR is created at `build/j3270.jar`.
### Gradle Build (Optional)
```bash
./gradlew build
./gradlew test
```
---
## 📜 Acknowledgements
- [x3270](https://x3270.miraheze.org/wiki/Main_Page) — Reference C implementation and protocol specifications
- [Antigravity](https://antigravity.google/)
- Claude Opus 4.6
- Gemini 3.1 Pro
- Gemini 3.7 Flash
- Gemma4 12B and 26B
- GPT-OSS 120B
- Qwen3 4B and 32B