{"id":15719589,"url":"https://github.com/dansoftowner/restart4j","last_synced_at":"2025-05-13T02:34:45.316Z","repository":{"id":130614819,"uuid":"335962750","full_name":"Dansoftowner/Restart4j","owner":"Dansoftowner","description":"Library for restarting your java application","archived":false,"fork":false,"pushed_at":"2021-05-30T19:42:57.000Z","size":1414,"stargazers_count":18,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T06:02:18.976Z","etag":null,"topics":["desktop","java","java-library","javafx","swing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dansoftowner.png","metadata":{"files":{"readme":"README.MD","changelog":null,"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":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-04T13:29:49.000Z","updated_at":"2025-01-12T22:49:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ecc0ca4-2d86-4491-af76-433a7834da04","html_url":"https://github.com/Dansoftowner/Restart4j","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FRestart4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FRestart4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FRestart4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dansoftowner%2FRestart4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dansoftowner","download_url":"https://codeload.github.com/Dansoftowner/Restart4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253860303,"owners_count":21975238,"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":["desktop","java","java-library","javafx","swing"],"created_at":"2024-10-03T21:56:15.335Z","updated_at":"2025-05-13T02:34:45.294Z","avatar_url":"https://github.com/Dansoftowner.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Restart4j\n\n[![](https://jitpack.io/v/Dansoftowner/Restart4j.svg)](https://jitpack.io/#Dansoftowner/Restart4j)\n[![GitHub last commit](https://img.shields.io/github/last-commit/Dansoftowner/Restart4j)](https://github.com/Dansoftowner/Restart4j/commits/master)\n[![GitHub issues](https://img.shields.io/github/issues/Dansoftowner/Restart4j)](https://github.com/Dansoftowner/Restart4j/issues)\n[![GitHub](https://img.shields.io/github/license/Dansoftowner/Restart4j)](LICENSE)\n\nLibrary for restarting your JVM application.\nYou will most likely use it for restarting your GUI application programmatically.\n\nIt works no matter how your application is running: \n * From Jar\n * From an IDE\n * From a unique packaged form\n * etc...\n\n### Requirements, Compatibility\n* **Java 8** or higher\n* Works on the 3 major platforms: **Windows**, **MacOS**, **Linux**\n\n### Installation\n\n#### Maven example\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Dansoftowner\u003c/groupId\u003e\n    \u003cartifactId\u003eRestart4j\u003c/artifactId\u003e\n    \u003cversion\u003e1.4.7\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n#### Gradle example\n\n```groovy\nrepositories {\n    ...\n    maven { url 'https://jitpack.io' }\n}\n```\n\n```groovy\ndependencies {\n    implementation 'com.github.Dansoftowner:Restart4j:1.4.7'\n}\n```\n\n### Some code examples\n\n#### Simple restart\n```java\nfinal ApplicationRestart appRestart = ApplicationRestart.builder().build();\nappRestart.restartApp();\n```\n\n#### Restart with more options\n```java\nfinal ApplicationRestart appRestart = ApplicationRestart.builder()\n        .beforeNewProcessCreated(() -\u003e System.out.println(\"New process will be created...\"))\n        .beforeCurrentProcessTerminated(() -\u003e System.out.println(\"The app will be terminated\"))\n        .build();\nappRestart.restartApp();\n```\n\n### Demo applications\nTwo demo applications can be found in the project:\n * [SimpleDemo](src/test/java/com/restart4j/SimpleDemo.java)\n * [ComplexDemo](src/test/java/com/restart4j/ComplexDemo.java)\n\n![Running SimpleDemo](demo/SimpleDemo.gif)\n\n# Projects using `Restart4j`\nIf this library is used by your project, let me know in the `Discussions` and I will mention that in this section.\n\n* [Document Archiver](https://github.com/Document-Archiver/com.sophisticatedapps.archiving.document-archiver) - Archive all your documents in a consistent way, which enables you to retrieve them later fast and easy.\n\n### Used libraries\n\n * [SLF4j](http://www.slf4j.org/) - Simple Logging Facade for java\n * [OSHI](https://github.com/oshi/oshi) - Operating System \u0026 Hardware information\n * [Jetbrains annotations](https://github.com/JetBrains/java-annotations) - Annotations for JVM-based languages\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdansoftowner%2Frestart4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdansoftowner%2Frestart4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdansoftowner%2Frestart4j/lists"}