Fix labeling
Build and Test j3270 / Build JAR & Run Tests (Java 21) (push) Successful in 49s
Build and Test j3270 / Build JAR & Run Tests (Java 11) (push) Successful in 1m33s
Build and Test j3270 / Build JAR & Run Tests (Java 17) (push) Successful in 1m35s

This commit is contained in:
2026-09-28 13:57:22 +00:00
parent fac6ac8bfb
commit cf0c0999bf
4 changed files with 14 additions and 37 deletions
+8 -6
View File
@@ -3,7 +3,7 @@
[![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%20(LTS)-blue.svg)](https://adoptium.net)
[![Tests](https://img.shields.io/badge/Tests-539%20passed-brightgreen.svg)]()
[![Tests](https://img.shields.io/badge/Tests-851%20passed-brightgreen.svg)]()
[![License](https://img.shields.io/badge/License-Unlicense-blue.svg)](LICENSE)
An **x3270-aligned and IBM Host On-Demand (HoD) compatible IBM 3270 mainframe terminal emulator & protocol library** written in pure Java with zero third-party runtime dependencies. Designed for high fidelity and compatibility with IBM z/OS, z/VM, and 3270-based systems over TN3270 and TN3270E.
@@ -12,10 +12,11 @@ An **x3270-aligned and IBM Host On-Demand (HoD) compatible IBM 3270 mainframe te
## 🚀 Quick Download & Run
### Latest Standalone JARs
Ready-to-run executable JARs are built and tested across all three Java LTS baselines (**Java 11, Java 17, and Java 21**) by Gitea Actions:
### Latest Standalone JARs & Maven Artifacts
Ready-to-run executable JARs and standalone library packages are built and tested across all three Java LTS baselines (**Java 11, Java 17, and Java 21**) by Gitea Actions:
- **[Download Latest Tagged Release (`j3270.jar`)](https://git.hugfreevikings.wtf/rudi/j3270/releases)**
- **Standalone Protocol Library (`lib3270j.jar`)**: Built by setup/build scripts and published to Maven (`haus.nightmare.j3270:lib3270j:1.2.4`).
- **[Latest Nightly CI Artifacts](https://git.hugfreevikings.wtf/rudi/j3270/actions)**: Download standalone JARs tailored for each LTS runtime under the latest workflow run:
- `j3270-java11-jar` (Java 11 LTS)
- `j3270-java17-jar` (Java 17 LTS — primary Gitea runner baseline)
@@ -105,7 +106,7 @@ java -jar j3270.jar -d mainframe.example.com
- **Host Catalog Browser**: Interactive directory dialog to query, parse, and browse CMS and TSO host dataset catalogs.
### 🌍 Internationalization & Character Sets
- **22+ Single-Byte EBCDIC Codepages**: US/Canada (037), Open Systems / z/OS Unix (1047), International (500, 1148 Euro), UK (285), Germany/Austria (273, 1141 Euro), France (297), Italy (280), Spain (284), Scandinavia (277, 278), Greece (875), Turkey (1026, 1155, 905), Eastern Europe (870), Iceland (871), Cyrillic (1025, 1123, 1154, 880), Hebrew (424, 803), Arabic (420), Thai (838, 1160).
- **40+ EBCDIC Codepages & Euro Variants**: US/Canada (037), Open Systems / z/OS Unix (1047), International (500, 1148 Euro), UK (285), Germany/Austria (273, 1141 Euro), France (297), Italy (280), Spain (284), Scandinavia (277, 278), Greece (875), Turkey (1026, 1155, 905), Eastern Europe (870), Iceland (871), Cyrillic (1025, 1123, 1154, 880), Hebrew (424, 803), Arabic (420), Thai (838, 1160), Japanese SBCS (290, 1027), and 10 full Euro variants (1140–1149).
- **Mixed DBCS Support**: Japanese Katakana (930), Japanese Latin (939), Simplified Chinese (935, 1388), Traditional Chinese (937, 1371), and Korean (933) with Shift-In (`0x0E`) / Shift-Out (`0x0F`) state handling.
- **APL & Special Graphics**: APL keyboard mode, box-drawing characters, and Graphic Escape (`GE`) symbol translations.
@@ -125,7 +126,7 @@ java -jar j3270.jar -d mainframe.example.com
- **Persistent Profiles**: Configuration profiles and session preferences saved in INI files (`j3270.ini`).
### 📦 Modular Zero-Dependency Core
- **`lib3270j`**: Standalone Java protocol and terminal engine with **zero third-party dependencies** (`java.base`, `java.desktop` only).
- **`lib3270j`**: Standalone Java protocol and terminal engine with **zero third-party dependencies** (`java.base`, `java.desktop` only). Distributed as standalone JAR (`build/lib3270j.jar`) and published Maven coordinate `haus.nightmare.j3270:lib3270j:1.2.4`.
- **`j3270`**: Standalone desktop Swing terminal application.
---
@@ -168,7 +169,7 @@ The project also provides low-level scripts and optional Gradle support:
# Direct compile and package without diagnostics:
sh ./build_all.sh
# Run all 539+ automated unit tests (~7s):
# Run all 851 automated unit tests (~25s):
sh ./test_all.sh
```
@@ -186,6 +187,7 @@ All pushes and pull requests are verified across **Java 11, 17, and 21 LTS** run
## 📜 Acknowledgements
- [x3270](https://x3270.miraheze.org/wiki/Main_Page) — Reference C implementation and protocol specifications
- IBM Bob — Architectural evaluation, Host On-Demand parity audit, and efficiency analysis
- [Antigravity](https://antigravity.google/)
- Claude Opus 4.6
- Gemini 3.1 Pro
+1 -1
View File
@@ -98,7 +98,7 @@ This means Docker's bridge network inside the runner container cannot resolve th
You can verify the entire build and test suite locally at any time without external tools:
```bash
# Compile and run all 539 unit tests (~7s):
# Compile and run all 851 unit tests (~25s):
sh ./test_all.sh
# Build executable standalone JAR:
@@ -31,8 +31,6 @@ package haus.nightmare.lib3270j.graphics;
* and clicking the visual menu emitted gy = 224 (missing the [187..200] menu bounding box).</li>
* <li><b>Failure Mode 3</b>: Intermediate raster buffering (e.g. fixed 800x600 canvas stretched to gridW x gridH)
* introduced rounding artifacts in bidirectional coordinate conversion (unmapX/unmapY).</li>
* <li><b>Failure Mode 4</b>: Overlapping dropdown menus (FILE, DRAW, TRANSFORM) lingering simultaneously when
* segment retention/clearing was decoupled from GDDM's segment lifecycle.</li>
* </ul>
*/
public class GddmCoordinateTransform {
@@ -444,34 +444,11 @@ public class GraphicsPlane implements PixelBuffer {
/**
* Total vertical presentation space units.
*
* <p>Historical / Architecture Note for Future Iterations:
* <ul>
* <li><b>Failed Approach 1 (Hardcoded 12-pitch / rows * 12)</b>:
* Used 516 units (yMax = 257) on 43-row screen. Caused upper coordinate truncation;
* menus at gy > 257 were clipped and mathematically impossible to pick.</li>
* <li><b>Failed Approach 2 (Hardcoded 16-pitch / rows * 16 without viewport alignment)</b>:
* Used 688 units (yMax = 343). Visual rendering was shifted downward by ~50 pixels relative
* to GDDM's internal picture space viewport, causing clicks at Row 7 to emit gy = 226
* which missed the GDDM menu hit box and caused terminal alarm beeps.</li>
* <li><b>Failed Approach 3 (Overwriting Graphic Input SF bytes 16-19 with row/col)</b>:
* Overwrote device correlation descriptor 0x00230023, causing GDDM Structured Field
* parser to reject inbound correlation packets as malformed.</li>
* <li><b>Failed Approach 4 (Misinterpreting Procedure Order 0x21 as Segment Redraw loop)</b>:
* Order 0x21 is HODCurrentDefaults (Set Current Defaults), not an executive redraw loop.
* Treating 0x21 as segment execution caused previous menu frames and stored segments
* to be repeatedly repainted over active screens, leaving behind visual ghost artifacts.</li>
* <li><b>Failed Approach 5 (Static yMax=343 scaling vs GDDM ADMDRAW Viewport bounds)</b>:
* In ADMDRAW, GDDM defines the graphics presentation space between y = -169 (canvas bottom)
* and y = +200 (top menu bar), with total height ~370 units. Mapping this into a static
* yMax = 343 (688 total height) renders the top menu at Row 9.2 (middle of the screen) with
* a large vertical void above it, and clicking the visual menu sends gy = 224 which misses
* the [187..200] menu bounding box. Furthermore, multiple dropdown menus (FILE, DRAW, TRANSFORM)
* overlapped simultaneously because segment retention and clearing was decoupled from GDDM's
* actual viewport state.</li>
* <li><b>Solution Path</b>: Use {@link GddmCoordinateTransform} for dynamic display and aspect
* scaling, ensuring host Query Reply metrics (SDH/AH) and GDDM Picture Space Window
* orders are synchronized with client-side mouse transformation.</li>
* </ul>
* <p>Calculated as {@code screenRows * charHeight} matching 3179G presentation
* space metrics. Dynamic display and aspect scaling relative to host picture
* space and viewport bounds are managed by {@link GddmCoordinateTransform}.
*
* @return Total presentation space height in units
*/
public int getTotalHeight() {
int rows = screenRows > 0 ? screenRows : 24;