Integration von Java mit IBM System i über JDBC

JDBC Verbindung

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

<

Microsoft Office 2019 Standard

Microsoft Office 2019 Standard

Preis: 19,90 EUR

Zum Angebot

Windows Server 2016 CALS

Windows Server 2016 CALS

Preis: 64,90 EUR

Zum Angebot

Microsoft Word 2021

Microsoft Word 2021

Preis: 14,90 EUR

Zum Angebot

AVG TuneUp ESD

AVG TuneUp ESD

Preis: 25,00 EUR

Zum Angebot

Windows 11 Home

Windows 11 Home

Preis: 19,90 EUR

Zum Angebot

AVG Internet Security

AVG Internet Security

Preis: 25,00 EUR

Zum Angebot

Office 2016 Home and Student

Office 2016 Home and Student

Preis: 14,90 EUR

Zum Angebot

Windows Server 2022 CALS

Windows Server 2022 CALS

Preis: 99,90 EUR

Zum Angebot

Microsoft Word 2016

Microsoft Word 2016

Preis: 14,90 EUR

Zum Angebot

Windows 10/11 Home

Windows 10/11 Home

Preis: 14,90 EUR

Zum Angebot

Windows Server 2022 RDS CALS

Windows Server 2022 RDS CALS

Preis: 109,90 EUR

Zum Angebot

McAfee Total Protection

McAfee Total Protection

Preis: 15,00 EUR

Zum Angebot

Microsoft Windows Server 2022 Datacenter

Microsoft Windows Server 2022 Datacenter

Preis: 219,00 EUR

Zum Angebot

Microsoft Word 2019

Microsoft Word 2019

Preis: 14,90 EUR

Zum Angebot

Windows 10/11 Pro

Windows 10/11 Pro

Preis: 19,90 EUR

Zum Angebot

Office 2021 Professional Plus f?r 3 Ger?te

Office 2021 Professional Plus f?r 3 Ger?te

Preis: 23,50 EUR

Zum Angebot

Avast Premium Security

Avast Premium Security

Preis: 20,00 EUR

Zum Angebot

Office 2016 Professional

Office 2016 Professional

Preis: 14,90 EUR

Zum Angebot

Windows Server 2016

Windows Server 2016

Preis: 99,90 EUR

Zum Angebot

Adobe Photoshop Elements 2025

Adobe Photoshop Elements 2025

Preis: 190,00 EUR

Zum Angebot

Microsoft Powerpoint 2019

Microsoft Powerpoint 2019

Preis: 29,90 EUR

Zum Angebot

McAfee Internet Security

McAfee Internet Security

Preis: 25,00 EUR

Zum Angebot

Panda Dome Complete MD

Panda Dome Complete MD

Preis: 25,00 EUR

Zum Angebot

Windows Server 2019 CALS

Windows Server 2019 CALS

Preis: 87,90 EUR

Zum Angebot

Visio 2019 Professional

Visio 2019 Professional

Preis: 14,90 EUR

Zum Angebot

Office 2021 Home and Student

Office 2021 Home and Student

Preis: 19,90 EUR

Zum Angebot

Office 2021 Professional Plus + Windows 11 Professional GRATIS

Office 2021 Professional Plus + Windows 11 Professional GRATIS

Preis: 24,90 EUR

Zum Angebot

Office 2016 Home and Business

Office 2016 Home and Business

Preis: 14,90 EUR

Zum Angebot

Bitdefender Antivirus Plus

Bitdefender Antivirus Plus

Preis: 50,00 EUR

Zum Angebot

Microsoft Excel 2021

Microsoft Excel 2021

Preis: 19,90 EUR

Zum Angebot

Office 2019 Professional plus

Office 2019 Professional plus

Preis: 39,90 EUR

Zum Angebot

mySteganos Online Shield VPN

mySteganos Online Shield VPN

Preis: 55,00 EUR

Zum Angebot

Microsoft Excel 2019

Microsoft Excel 2019

Preis: 14,90 EUR

Zum Angebot

Norton 360 Deluxe inkl. 25GB MD

Norton 360 Deluxe inkl. 25GB MD

Preis: 25,00 EUR

Zum Angebot

Office 2019 Home and Business

Office 2019 Home and Business

Preis: 19,90 EUR

Zum Angebot

Panda Dome Advanced MD

Panda Dome Advanced MD

Preis: 15,00 EUR

Zum Angebot

Microsoft Windows Server 2022

Microsoft Windows Server 2022

Preis: 349,90 EUR

Zum Angebot

AVG Ultimate

AVG Ultimate

Preis: 25,00 EUR

Zum Angebot

Office 2021 Professional Plus + Windows 11 Professional Bundle

Office 2021 Professional Plus + Windows 11 Professional Bundle

Preis: 24,90 EUR

Zum Angebot

Windows Server 2016 RDS CALS

Windows Server 2016 RDS CALS

Preis: 64,90 EUR

Zum Angebot

Office 2019 Home and Student

Office 2019 Home and Student

Preis: 19,90 EUR

Zum Angebot

McAfee VPN Safe Connect

McAfee VPN Safe Connect

Preis: 30,00 EUR

Zum Angebot

Office 2021 Professional Plus

Office 2021 Professional Plus

Preis: 19,90 EUR

Zum Angebot

Pinnacle Studio 26 (2023) STANDARD Windows / Deutsch

Pinnacle Studio 26 (2023) STANDARD Windows / Deutsch

Preis: 110,00 EUR

Zum Angebot

Windows 11 Pro

Windows 11 Pro

Preis: 14,90 EUR

Zum Angebot

Watchdog Anti-Malware Vollversion

Watchdog Anti-Malware Vollversion

Preis: 25,00 EUR

Zum Angebot

ESET NOD32 Antivirus

ESET NOD32 Antivirus

Preis: 50,00 EUR

Zum Angebot

Windows 10 Pro

Windows 10 Pro

Preis: 14,90 EUR

Zum Angebot

Windows 10 Home

Windows 10 Home

Preis: 14,90 EUR

Zum Angebot

Adobe Acrobat Standard 2020 OEM

Adobe Acrobat Standard 2020 OEM

Preis: 900,00 EUR

Zum Angebot

Visio 2016 Professional

Visio 2016 Professional

Preis: 14,90 EUR

Zum Angebot

Bitdefender Premium VPN

Bitdefender Premium VPN

Preis: 90,00 EUR

Zum Angebot

Office 2019 Professional Plus

Office 2019 Professional Plus

Preis: 14,90 EUR

Zum Angebot

Office 2021 Home and Business

Office 2021 Home and Business

Preis: 24,90 EUR

Zum Angebot

Office 2024 Home

Office 2024 Home

Preis: 44,90 EUR

Zum Angebot

Windows Server 2019 RDS CALS

Windows Server 2019 RDS CALS

Preis: 93,90 EUR

Zum Angebot

Windows Server Standard 2022

Windows Server Standard 2022

Preis: 194,90 EUR

Zum Angebot

Kaspersky Mobile

Kaspersky Mobile

Preis: 25,00 EUR

Zum Angebot

Office 2024 Professional

Office 2024 Professional

Preis: 39,90 EUR

Zum Angebot

Microsoft Office 2021 Standard

Microsoft Office 2021 Standard

Preis: 24,90 EUR

Zum Angebot

Panda Dome Essential MD

Panda Dome Essential MD

Preis: 15,00 EUR

Zum Angebot

Office 2021 Professional

Office 2021 Professional

Preis: 19,90 EUR

Zum Angebot

Office 2024 Professional Plus

Office 2024 Professional Plus

Preis: 29,99 EUR

Zum Angebot

Office 2019 Professional

Office 2019 Professional

Preis: 39,90 EUR

Zum Angebot
>

Eine Datenselektion – viele Exportformate

zeus-access-400

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.

Werbung/Advertising

Aromatico

Download & Build

Projekt auf GitHub ansehen

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 Windows
  • runexport.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 ResultSets 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.