{"id":26972651,"url":"https://github.com/clouderhem/jvm-tools","last_synced_at":"2025-07-13T07:03:09.521Z","repository":{"id":188929127,"uuid":"679705805","full_name":"CLOUDERHEM/jvm-tools","owner":"CLOUDERHEM","description":"使用javaagent实现小工具","archived":false,"fork":false,"pushed_at":"2023-10-18T11:50:19.000Z","size":5234,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-18T12:44:10.211Z","etag":null,"topics":[],"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/CLOUDERHEM.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}},"created_at":"2023-08-17T12:41:27.000Z","updated_at":"2023-08-20T12:13:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e461ab1-2e81-43b5-a166-6b793a78474c","html_url":"https://github.com/CLOUDERHEM/jvm-tools","commit_stats":null,"previous_names":["clouderhem/jvm-tools"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CLOUDERHEM%2Fjvm-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CLOUDERHEM%2Fjvm-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CLOUDERHEM%2Fjvm-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CLOUDERHEM%2Fjvm-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CLOUDERHEM","download_url":"https://codeload.github.com/CLOUDERHEM/jvm-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970316,"owners_count":20862509,"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":"2025-04-03T09:18:21.500Z","updated_at":"2025-04-03T09:18:21.959Z","avatar_url":"https://github.com/CLOUDERHEM.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jvm-tools\n\n## 说明\n\n`jvm-tools`是使用`javaagent`和`javaasist`实现的一些小功能\n\n## 使用\n\n1. 找到java程序的pid\n2. 使用命令`java -jar jvm-tools.jar \u003cpid\u003e` attach到目标java进程\n3. 在终端中输入支持的指令\n\n## 支持指令\n\n### 方法参数打印\n\n* 输入打印方法的参数\n* 指令: `methodlog \u003cclassName\u003e \u003cmethodName\u003e`\n\n### 还原类\n\n* 能够将修改的类还原\n* 指令: `restoreclass \u003cclassName\u003e`\n\n### 退出\n\n* 关闭attach时候启动的`netty`服务端, 客户端也同时关闭\n* 指令: `shutdown`\n\n### 类热替换\n\n* 通过新的字节码url地址, 热替换类文件\n* 指令`hotswapclass \u003cclassName\u003e \u003cclassFileUrl\u003e`\n\n## 说明\n\n**on jdk1.8**\n\n* `retransformClasses`\n    1. 可以更改方法体、常量池和属性\n    2. 不得添加、删除、重命名字段或方法\n    3. 不得更改方法签名或更改类继承\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclouderhem%2Fjvm-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclouderhem%2Fjvm-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclouderhem%2Fjvm-tools/lists"}