Integration von Java mit IBM System i über JDBC
In unserem vorherigen Beitrag hast du bereits die Grundlagen von JDBC kennengelernt – insbesondere im Zusammenspiel mit IBM System i (AS/400) und dem JTOpen-Treiber. In diesem Artikel gehen wir einen Schritt weiter: Wir zeigen dir, wie das Open-Source-Projekt zeus-access-400
den Zugriff auf IBM i Datenbanken per JDBC effizient umsetzt.
Jede Klasse im Projekt übernimmt eine klar definierte Aufgabe. Gemeinsam ermöglichen sie es, Java-Anwendungen nahtlos mit dem IBM System i zu verbinden – und die Ergebnisse flexibel in verschiedene Formate zu exportieren.
Werbung/Advertising
Dell Latitude 5530 15,6 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 16GB Windows 11 Pro Webcam

Preis: 749,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre neo 50q Gen 4 Intel Core i5-13420H 512GB SSD 16GB Windows 11 Pro inkl. W-Lan - Neugerät

Preis: 679,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 5430 14 Zoll 1920x1080 Full HD Intel Core i5 512GB SSD 16GB Windows 11 Pro LTE

Preis: 968,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre neo 50q Gen 4 Intel Core i5-13420H 256GB SSD 8GB Windows 11 Pro inkl. W-Lan - Neugerät

Preis: 639,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre M70q Tiny Intel Core i5-10500T 2TB SSD 16GB Windows 11 Pro

Preis: 579,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 5510 15,6 Zoll 1920x1080 Full HD Intel Core i7 1TB SSD 32GB Windows 11 Home Webcam

Preis: 739,00 EUR
Zum AngebotFujitsu Esprimo Q957 Intel Core i3 128GB SSD + 500GB HDD 8GB Windows 10 Home

Preis: 219,00 EUR
Zum Angebot 🔥 BestsellerHP EliteBook 845 G8 14 Zoll 1920x1080 Full HD AMD Ryzen 7 PRO 512GB SSD 16GB Windows 11 Pro Fingerprint

Preis: 759,00 EUR
Zum AngebotFujitsu Celsius M740 Intel Xeon Core E5 1620 v4 512GB SSD + 2TB HDD 32GB Windows 10 Pro Nvidia Quadro

Preis: 388,00 EUR
Zum Angebot 🔥 BestsellerHP ZBook Fury 15 G7 15,6 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 32GB Windows 11 Pro Nvidia Quadro

Preis: 729,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre M70q Gen 5 Tiny Intel Core i5 256GB SSD 8GB Windows 11 Pro inkl. W-Lan - Neugerät

Preis: 719,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre Tiny-in-One 24 Gen 4 schwarz 23,8 Zoll Full HD 1920x1080 DisplayPort inkl. Webcam - Neugerät

Preis: 269,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 5420 Rugged 14 Zoll Touch Display Intel Core i5 512GB SSD 16GB Windows 11 Pro

Preis: 809,00 EUR
Zum AngebotFujitsu Esprimo D956 E85+ Desktop Intel Quad Core i5 256GB SSD 8GB Windows 10 Home

Preis: 219,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 5510 15,6 Zoll 1920x1080 Full HD Intel Core i7 1TB SSD 32GB Windows 11 Pro Webcam

Preis: 759,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkStation P330 Tiny USDT Intel Six Core i7 512GB SSD 16GB Windows 11 Pro Nvidia Quadro

Preis: 558,00 EUR
Zum Angebot 🔥 BestsellerHP ZBook Fury 15 G8 15,6 Zoll 3840x2160 4K UHD Intel Core i7 512GB SSD 32GB Windows 11 Pro Nvidia Quadro T1200

Preis: 749,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre M70q Gen 5 Tiny Intel Core i5 256GB SSD 16GB Windows 11 Pro inkl. W-Lan - Neugerät

Preis: 749,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkStation P330 Tower Gen 2 Intel Core i7 512GB SSD 32GB Windows 11 Pro Nvidia Quadro RTX 4000

Preis: 899,00 EUR
Zum AngebotEizo FlexScan EV2736W-BK LED IPS 27 Zoll WQHD 2560x1440 DisplayPort DVI Schwarz

Preis: 279,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 5440 14 Zoll 1920x1080 Full HD Intel Core i5 256GB SSD 16GB Windows 11 Pro Webcam

Preis: 629,00 EUR
Zum Angebot 🔥 BestsellerHP EliteBook 840 G8 14 Zoll 1920x1080 Full HD Intel Core i5 256GB SSD 16GB Windows 10 Pro - Neugerät

Preis: 728,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre neo 50q Gen 4 Intel Core i5-13420H 256GB SSD 16GB Windows 11 Pro inkl. W-Lan - Neugerät

Preis: 659,00 EUR
Zum Angebot 🔥 BestsellerHP ZBook Firefly 15 G7 15,6 Zoll 1920x1080 Full HD Intel Core i5 512GB SSD 16GB Windows 11 Pro Fingerprint

Preis: 779,00 EUR
Zum Angebot 🔥 BestsellerHP ZBook 15 G6 15,6 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 16GB Windows 10 Pro

Preis: 898,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkVision T24v-10 schwarz 23,8 Zoll Full HD 1920x1080 HDMI DisplayPort VGA Höhenverstellbar

Preis: 159,00 EUR
Zum AngebotFujitsu Esprimo D756 E85+ Intel Pentium G4400 256GB SSD 4GB Windows 10 Pro DVD Brenner

Preis: 219,00 EUR
Zum AngebotEizo FlexScan EV2450-GY LED grau 24 Zoll Full HD 1920x1080 HDMI DisplayPort VGA DVI Höhenverstellbar

Preis: 168,00 EUR
Zum Angebot 🔥 BestsellerHP ZBook 15 G6 15,6 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 32GB Windows 11 Pro Nvidia Quadro

Preis: 779,00 EUR
Zum Angebot 🔥 BestsellerLenovo Thinkpad Thunderbolt 3 Dock 40AC Dockingstation inkl. 135 Watt Netzteil inkl. USB-C Kabel 40AC0135EU

Preis: 119,00 EUR
Zum AngebotMSA-1 Monitorschwenkarm High Quality, Aluminium silbergrau, inkl. Tischbefestigung

Preis: 168,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkPad Thunderbolt 3 Dock 40AC Dockingstation inkl. 135 Watt Netzteil inkl. USB-C Kabel 40AC0135EU

Preis: 119,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkVision T24v-10 schwarz 23,8 Zoll Full HD 1920x1080 HDMI DisplayPort VGA Höhenverstellbar 61BCMAR6

Preis: 159,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkStation P520c Intel Xeon W-2133 512GB SSD 32GB Windows 11 Pro Nvidia Quadro P4000

Preis: 699,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkPad Universal Thunderbolt 4 Dock Dockingstation inkl. 135 Watt Netzteil inkl. Thunderbolt 4 Kabel 40B00135EU

Preis: 149,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkCentre Tiny-in-One 24 Gen 4 schwarz 23,8 Zoll Full HD 1920x1080 DisplayPort inkl. Webcam

Preis: 259,00 EUR
Zum AngebotEizo FlexScan EV2436WFS-GY Lichtgrau 24 Zoll WUXGA 1920x1200 DisplayPort DVI VGA

Preis: 149,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 5410 14 Zoll 1920x1080 Full HD Intel Core i7 1TB SSD 32GB Windows 11 Pro Webcam

Preis: 629,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkVision T24v-10 schwarz 23,8 Zoll Full HD 1920x1080 HDMI DisplayPort VGA Höhenverstellbar 61BCMAR6EU

Preis: 149,00 EUR
Zum AngebotFujitsu Esprimo D956 E85+ Desktop Intel Quad Core i5 256GB SSD 4GB Windows 10 Pro DVD Brenner

Preis: 269,00 EUR
Zum AngebotFujitsu Esprimo Q556 Intel Core i3 128GB SSD 4GB Windows 10 Home DVD Brenner

Preis: 199,00 EUR
Zum AngebotMicrosoft Office 365 Business Standard - 1 Nutzer

Preis: 159,00 EUR
Zum AngebotApple iPhone 11 Smartphone Handy 6,1 Zoll 64GB Speicher Schwarz

Preis: 279,00 EUR
Zum Angebot 🔥 BestsellerLenovo ThinkStation P520c Intel Xeon W-2133 512GB SSD 32GB Windows 10 Pro Nvidia Quadro P4000

Preis: 699,00 EUR
Zum AngebotApple iPhone XR Smartphone Handy 6,1 Zoll 64GB Speicher Schwarz

Preis: 189,00 EUR
Zum AngebotApple iPhone 11 Smartphone Handy 6,1 Zoll 128GB Speicher Schwarz

Preis: 279,00 EUR
Zum Angebot 🔥 BestsellerHP ZBook Fury 15 G8 15,6 Zoll 3840x2160 4K UHD Intel Core i7 512GB SSD 32GB Windows 10 Pro Nvidia Quadro T1200

Preis: 759,00 EUR
Zum AngebotFujitsu Esprimo P758 E85+ Intel Core i5-8500 512GB SSD 16GB Windows 11 Pro

Preis: 299,00 EUR
Zum AngebotFujitsu Esprimo D956 E85+ Desktop Intel Quad Core i5 256GB SSD 8GB Windows 10 Pro

Preis: 269,00 EUR
Zum AngebotPhilips V-Line 243V7QDSB 24 Zoll Full HD 1920x1080 IPS VGA DVI HDMI Schwarz NEU & OVP

Preis: 139,00 EUR
Zum AngebotFujitsu Celsius M740 Intel Xeon Quad Core E5 v4 512GB SSD 32GB Windows 10 Pro Nvidia Quadro

Preis: 719,00 EUR
Zum AngebotApple iPhone XR Smartphone Handy 6,1 Zoll 128GB Speicher Schwarz

Preis: 229,00 EUR
Zum Angebot 🔥 BestsellerLenovo Thinkpad Thunderbolt 3 Dock 40AC Dockingstation inkl. 135 Watt Netzteil inkl. USB-C Kabel

Preis: 129,00 EUR
Zum Angebot 🔥 BestsellerHP ZBook Fury 15 G7 15,6 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 32GB Windows 11 Pro Nvidia Quadro T1000

Preis: 879,00 EUR
Zum AngebotEizo FlexScan EV2436W-BK schwarz 24 Zoll WUXGA 1920x1200 DisplayPort DVI Höhenverstellbar

Preis: 159,00 EUR
Zum AngebotAOC I2475PXQU-GR Pro-line LED grau 23,8 Zoll Full HD 1920x1080 DisplayPort HDMI DVI-D VGA USB Höhenverstellbar

Preis: 119,00 EUR
Zum AngebotFujitsu B24-8 TE Pro LED grau 23,8 Zoll Full-HD 1920x1080 DVI-D DisplayPort VGA

Preis: 139,00 EUR
Zum AngebotFujitsu Display B22-8 WE Neo 22 Zoll HD+ 1680x1050 DisplayPort DVI-D VGA Höhenverstellbar NEU & OVP

Preis: 139,00 EUR
Zum Angebot 🔥 BestsellerDell UltraSharp U2412M schwarz 24 Zoll WUXGA 1920x1200 DisplayPort DVI-D VGA USB Höhenverstellbar

Preis: 139,00 EUR
Zum Angebot 🔥 BestsellerHP EliteBook 840 G7 14 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 32GB Windows 10 Pro LTE

Preis: 808,00 EUR
Zum AngebotApple iPhone 7 Smartphone Handy 4,7 Zoll 32GB Speicher Schwarz

Preis: 129,00 EUR
Zum Angebot 🔥 BestsellerDell P2419HC schwarz 23,8 Zoll Full HD 1920x1080 DisplayPort HDMI USB Höhenverstellbar

Preis: 199,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 5510 15,6 Zoll 1920x1080 Full HD Intel Core i5 512GB SSD 16GB Windows 11 Pro Webcam

Preis: 609,00 EUR
Zum Angebot 🔥 BestsellerDell Precision 7550 15,6 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 32GB Windows 11 Pro Nvidia Quadro

Preis: 789,00 EUR
Zum AngebotFujitsu P2410 TS CAM schwarz 23,8 Zoll Full HD 1920x1080 HDMI DisplayPort USB inkl. Webcam - Neugerät

Preis: 169,00 EUR
Zum Angebot 🔥 BestsellerDell Latitude 7420 14 Zoll 1920x1080 Full HD Intel Core i7 512GB SSD 16GB Windows 11 Pro Webcam

Preis: 629,00 EUR
Zum AngebotApple iPhone SE (2022) 64GB Dual-SIM Mitternacht MMXF3ZD/A

Preis: 389,00 EUR
Zum AngebotFujitsu Esprimo P758 E85+ Intel Core i5-8500 512GB SSD 16GB Windows 10 Pro

Preis: 319,00 EUR
Zum AngebotApple iPad Air 2 Tablet 9,7 Zoll Retina Multi-Touch 64GB SSD Wi-Fi + Cellular Space Grau

Preis: 219,00 EUR
Zum AngebotLG 24BK550Y-B schwarz 24 Zoll Full HD 1920x1080 VGA DVI DisplayPort HDMI Höhenverstellbar

Preis: 119,00 EUR
Zum AngebotApple iPad 7 Tablet 10,2 Zoll Retina Multi-Touch 32GB SSD Wi-Fi Space Grau

Preis: 179,00 EUR
Zum AngebotEizo FlexScan EV2456-BK schwarz 24 Zoll WUXGA 1920x1200 DisplayPort HDMI DVI-D VGA USB Höhenverstellbar

Preis: 209,00 EUR
Zum AngebotApple iPad 6 Tablet 9,7 Zoll Retina Multi-Touch 128GB SSD Wi-Fi + Cellular Space Grau

Preis: 339,00 EUR
Zum AngebotEine Datenselektion – viele Exportformate
Das Projekt unterstützt eine Vielzahl von Formaten, um die Ausgabe genau an deinen Bedarf anzupassen:
- XML: Strukturiert und bestens für datenlastige Anwendungen geeignet
- HTML: Ideal für browserbasierte Auswertungen und Reportings
- JSON: Das Standardformat für APIs und moderne Webanwendungen
- JSONL: Zeilenbasierte JSON-Ausgabe für große Datenmengen
- CSV: Klassisches Exportformat für Excel & Co.
- Markdown (MD): Praktisch für Doku direkt auf GitHub oder GitLab
Durch diese Vielfalt an Formaten ist zeus-access-400
vielseitig einsetzbar – sei es in der Analyse, der Visualisierung oder zur Dokumentation von Daten.
Download & Build
CSV - comma separated values
HTML - hypertext markup language
JSON - javascript object notation
JSONL - javascript object notation lines
MD - markdown
XML - extended markup language
zeus-acces-400 - zipped sample-program file/folder structure
zeus-access-400 - example call on power shell
Projekt kompilieren (Maven Build)
Im Projektverzeichnis kannst du mit folgendem Befehl die JAR erzeugen:
mvn clean package
Das bereinigt vorherige Builds und erzeugt ein neues Artefakt im target
-Ordner. Siehe auch diesen Beitrag zur pom.xml.
Deployment: zeus-access-400.zip
Für die einfache Installation kannst du die ZIP-Datei verwenden. Nach dem Entpacken einfach die jt400.jar hinzufügen und application.properties anpassen.
Starte die Anwendung mit den beiliegenden Skripten:
runexport.cmd
für Windowsrunexport.sh
für Unix / OS400
Projektstruktur im Überblick:
./zeus-access-400 │ application.properties │ runexport.cmd │ runexport.sh │ zeus-access-400-1.0-SNAPSHOT.jar │ ├───export └───xslt xml_to_csv.xslt xml_to_html.xslt xml_to_json.xslt xml_to_jsonl.xslt xml_to_md.xslt
Start der Anwendung
Unter Unix/Linux/System-i:
java -cp "zeus-access-400-1.0-SNAPSHOT.jar:jt400.jar" de.zeus.hermes.AppInitializer application.properties
Unter Windows:
java -cp "zeus-access-400-1.0-SNAPSHOT.jar;jt400.jar" de.zeus.hermes.AppInitializer application.properties
Beachte den Unterschied bei den Trennzeichen im Classpath (Doppelpunkt vs. Semikolon).
Die Klassen im Überblick
AppInitializer
Startpunkt der Anwendung. Lädt Konfigurationen und startet den Datenbank-Service.
Config
Singleton zur Verwaltung aller Konfigurationsparameter wie Datenbankzugang & Abfragen.
PropertiesLoader
Lädt Konfigurationen aus externen Dateien, auch aus JARs – flexibel für verschiedene Umgebungen.
DatabaseManager
Stellt Verbindungen her, führt SQL aus, schließt sauber – die JDBC-Arbeitsmaschine.
DatabaseController
Verbindet sich mit der DB über den DatabaseManager
, delegiert Exporte an XmlExporter
.
DatabaseService
Abstrakte Schicht für spezifische Datenbankaktionen wie XML-Exporte – entkoppelt die Logik.
XmlExporter
Konvertiert ResultSet
s in XML, kümmert sich um Dateiausgabe & Struktur.
XMLtransformer
Wandelt XML mithilfe von XSLT in andere Formate (z. B. JSON, HTML, Markdown) um.
Weitere Ressourcen
Fazit und Ausblick
zeus-access-400
ist ein praxisnahes Beispiel, wie du mit Java und JDBC effizient auf IBM System i zugreifen kannst. Durch die modulare Architektur und den Einsatz gängiger Exportformate ist es ein starkes Werkzeug für Entwickler, die Daten nicht nur abrufen, sondern auch professionell weiterverarbeiten wollen.
Im nächsten Artikel zeigen wir, wie die JDBC-API auch mit anderen Datenbanksystemen eingesetzt werden kann – denn Java kennt hier (fast) keine Grenzen.