{"id":18773936,"url":"https://github.com/ejunjsh/classloader-example","last_synced_at":"2025-10-22T10:56:25.054Z","repository":{"id":109691013,"uuid":"145531901","full_name":"ejunjsh/classloader-example","owner":"ejunjsh","description":"this is experiment to know how classloader run","archived":false,"fork":false,"pushed_at":"2018-08-21T14:07:52.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-22T00:42:19.456Z","etag":null,"topics":["classloader","java"],"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/ejunjsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-08-21T08:28:32.000Z","updated_at":"2018-08-21T14:08:45.000Z","dependencies_parsed_at":"2023-07-29T14:46:10.710Z","dependency_job_id":null,"html_url":"https://github.com/ejunjsh/classloader-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ejunjsh/classloader-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fclassloader-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fclassloader-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fclassloader-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fclassloader-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejunjsh","download_url":"https://codeload.github.com/ejunjsh/classloader-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fclassloader-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280424213,"owners_count":26328462,"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-22T02:00:06.515Z","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","java"],"created_at":"2024-11-07T19:36:21.109Z","updated_at":"2025-10-22T10:56:25.015Z","avatar_url":"https://github.com/ejunjsh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# classloader-example\n\nthis is experiment to know how classloader run\n\n# begin\n\n    sudo docker-compose run app\n    \nthen will return a bash ,you run below command\n\n    sh container.sh\n    \nthen the output is \n\n    # ignore maven build log\n    start up the app 1:\n    AppClassLoader load applib1\n    applib1:\n    CommonClassLoader load Calculator\n    3\n    start up the app 2:\n    AppClassLoader load applib2\n    applib2:\n    4\n    \ni define two classloader `AppClassLoader` and its parent classloader`CommonClassLoader`, \n\nthe first classloader loads classes in path you specify.\n\nthe second classloader loads classes from common path `/opt/cl/common`,so i put the `Calculator` class there\n\nso i execute `container` that run two app `app1` and `app2`\n\nyou will see the output they load `calcultor` from `CommonClassLoader` only one time\n\nand use  `AppClassLoader` to load their own  `applib`\n\nfor detail you can see the code.\n\n# conclusion\n\nthis example is similar with tomcat or some other web container. \n\nthey use `AppClassLoader` to load the different application\n\nbut share common library with `CommonClassLoader`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejunjsh%2Fclassloader-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejunjsh%2Fclassloader-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejunjsh%2Fclassloader-example/lists"}