{"id":15069088,"url":"https://github.com/chrisgleissner/jisolate","last_synced_at":"2025-10-04T11:49:02.285Z","repository":{"id":7656649,"uuid":"9017832","full_name":"chrisgleissner/jisolate","owner":"chrisgleissner","description":"Java Code Isolation","archived":false,"fork":false,"pushed_at":"2021-04-26T18:06:15.000Z","size":72,"stargazers_count":16,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T17:58:03.060Z","etag":null,"topics":["classloader","classloader-isolation","isolation","java","java-11","java-8","vm-isolation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisgleissner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-25T22:43:52.000Z","updated_at":"2024-03-31T14:13:34.000Z","dependencies_parsed_at":"2022-09-11T14:00:45.854Z","dependency_job_id":null,"html_url":"https://github.com/chrisgleissner/jisolate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chrisgleissner/jisolate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgleissner%2Fjisolate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgleissner%2Fjisolate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgleissner%2Fjisolate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgleissner%2Fjisolate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisgleissner","download_url":"https://codeload.github.com/chrisgleissner/jisolate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisgleissner%2Fjisolate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278308628,"owners_count":25965654,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["classloader","classloader-isolation","isolation","java","java-11","java-8","vm-isolation"],"created_at":"2024-09-25T01:40:25.246Z","updated_at":"2025-10-04T11:49:02.268Z","avatar_url":"https://github.com/chrisgleissner.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jisolate\n\n[![Build Status](https://travis-ci.org/chrisgleissner/jisolate.svg?branch=master)](https://travis-ci.org/chrisgleissner/jisolate)\n[![Coverage Status](https://coveralls.io/repos/chrisgleissner/jisolate/badge.svg)](https://coveralls.io/r/chrisgleissner/jisolate)\n\n\nJisolate is an API for isolating Java classes using either classloader or VM isolation. \n\n## Why Isolation?\n\nIsolates are useful to load the same class multiple times, typically using different configurations.\nFor example, some frameworks are configured using static singletons. For tests, it is often useful \nto start multiple instances of these frameworks, each with its own configuration.  \n\n\n## Classloader Isolation\n\nClassloader isolation uses a child-first classloader combined with thread-local system properties\nto ensure that non-JDK classes can be loaded multiple times in the same JVM. \n\nClassloader isolation is the isolation approach of choice as it is the most performant approach of ensuring isolation\nand allows for an easy way to communicate results from the isolated code back to its invoker.\n\n```java\nJisolate.classLoaderIsolation()\n    .withIsolatableClass(IsolatedClass.class)\n    .withIsolatableArguments(\"foo\")\n    .isolate();\n```\n\n## VM Isolation\n\nVM isolation spawns a child VM process. This provides even better isolation than the classloader approach,\nbut it takes slightly longer to setup.\n\n```java\nJisolate.jvmIsolation()\n    .withMainClass(IsolatedClass.class)\n    .withMainClassArguments(\"foo\")\n    .isolate();\n```\n\n#### Lifecycle control\n\nVM isolation also allows for forcefully terminating the isolated JVM process when it's no longer needed:\n\n```java\ntry (JvmIsolate isolate = Jisolate.jvmIsolation()\n    .withMainClass(IsolatedClass.class)\n    .withMainClassArguments(\"foo\")\n    .isolate()) {\n    \n    // The isolated JVM is automatically terminated on leaving this block    \n}\n```\n\n## JSR-121\n\nJisolate is not an implementation of \u003ca href=\"http://www.jcp.org/en/jsr/detail?id=121\"\u003eJSR-121\u003c/a\u003e, the Application\nIsolation API Specification. Instead, it is a light-weight and pragmatic approach of providing\na best effort isolation of Java classes that is useful for many scenarios.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisgleissner%2Fjisolate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisgleissner%2Fjisolate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisgleissner%2Fjisolate/lists"}