{"id":19011514,"url":"https://github.com/perrywerneck/tn3270-java","last_synced_at":"2026-04-25T02:30:18.146Z","repository":{"id":107154338,"uuid":"183639061","full_name":"PerryWerneck/tn3270-java","owner":"PerryWerneck","description":"JNI Module for lib3270/pw3270","archived":false,"fork":false,"pushed_at":"2023-06-02T07:35:26.000Z","size":214,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-01T21:46:23.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerryWerneck.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-26T14:03:51.000Z","updated_at":"2024-07-29T18:04:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f4d8a90-1576-4885-913b-e15400984ef5","html_url":"https://github.com/PerryWerneck/tn3270-java","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerryWerneck%2Ftn3270-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerryWerneck%2Ftn3270-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerryWerneck%2Ftn3270-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerryWerneck%2Ftn3270-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerryWerneck","download_url":"https://codeload.github.com/PerryWerneck/tn3270-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240042821,"owners_count":19738957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:14:39.683Z","updated_at":"2026-04-25T02:30:18.068Z","avatar_url":"https://github.com/PerryWerneck.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java tn3270 protocol library\n\nJava class for interaction with pw3270 or lib3270.\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n![CodeQL](https://github.com/PerryWerneck/tn3270-java/workflows/CodeQL/badge.svg)\n[![build result](https://build.opensuse.org/projects/home:PerryWerneck:pw3270/packages/tn3270-java/badge.svg?type=percent)](https://build.opensuse.org/package/show/home:PerryWerneck:pw3270/tn3270-java)\n\n## Instalation\n\n### Linux\n\n[\u003cimg src=\"https://raw.githubusercontent.com/PerryWerneck/pw3270/master/branding/obs-badge-en.svg\" alt=\"Download from open build service\" height=\"80px\"\u003e](https://software.opensuse.org/download.html?project=home%3APerryWerneck%3Apw3270\u0026package=tn3270-java)\n\n### Windows\n\nThe jar and zip files for windows can be found on [Releases](../../releases)\n\n## Examples\n\nGetting versions of jni module and loaded lib3270\n\n```java\nimport br.app.pw3270.Terminal;\n\npublic class Sample {\n\n    public static void main (String[] args) {\n\n        try (Terminal host = new Terminal()) {\n\n\t\tSystem.out.println(\"Using ipc3270 version \" + host.getVersion() + \"-\" + host.getRevision());\n\t\tSystem.out.println(\"Using lib3270 version \" + host.getLib3270Version() + \"-\" + host.getLib3270Revision()); \n\t\t    \n\t} catch (Exception e) {\n\n\t\te.printStackTrace();\n\n\t}\n        \n    }\n    \n}\n```\n\nGet pw3270's session contents\n\n```java\nimport br.app.pw3270.Terminal;\n\npublic class Sample {\n\n\tpublic static void main (String[] args) {\n\n\t\ttry (Terminal host = new Terminal(\":a\")) {\n\t\t\t\n\t\t\thost.setCharSet(\"UTF-8\");\n\t\t\t\n\t\t\tif(!host.getConnected()) {\n\t\t\t\tSystem.out.println(\"Connecting to host\");\n\t\t\t\thost.connect(20);\n\t\t\t}\n\n\t\t\tif(!host.getConnected()) {\n\t\t\t\tSystem.out.println(\"The host is not connected\");\n\t\t\t} else if(!host.getReady()) {\n\t\t\t\tSystem.out.println(\"The host is not ready\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(host.toString());\n\t\t\t}\n\t\t        \n\t\t} catch (Exception e) {\n\t\t\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}\n    \n}\n```\n\n## Building for Linux\n\n### Requirements\n\n * [libipc3270](../../../libipc3270)\n\n## Building for windows\n\n### Windows native with MSYS2\n\n1. Install java sdk\n\n2. Get the latest protocol library release for mingw: [mingw-lib3270.tar.xz](../../../lib3270/releases)\n\n3. Get the latest 'glue' library release for mingw: [mingw-libipc3270.tar.xz](../../../libipc3270/releases)\n\n4. Install the required libraries on mingw shell\n\n\t```shell\n\ttar -C / -Jxvf mingw-lib3270.tar.xz\n\ttar -C / -Jxvf mingw-libipc3270.tar.xz\n\t```\n\n3. Get sources from git\n\n\t```shell\n\tgit clone https://github.com/PerryWerneck/tn3270-java.git ./tn3270-java\n\t```\n\n4. Build package using the mingw shell\n\n\t```shell\n\tcd tn3270-java\n\t./autogen.sh\n\tmake all\n\t```\n\t\n5. Make jar\n\n\t```shell\n\tmake package\n\t```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrywerneck%2Ftn3270-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperrywerneck%2Ftn3270-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrywerneck%2Ftn3270-java/lists"}