{"url":"https://www.sakatakoichi.com/entry/2016/12/05/105138","width":"100%","blog_url":"https://www.sakatakoichi.com/","author_name":"jyukutyo","provider_url":"https://hatena.blog","title":"How to get an application class loader in Java Agent method","type":"rich","provider_name":"Hatena Blog","categories":["java","jvm"],"image_url":null,"author_url":"https://blog.hatena.ne.jp/jyukutyo/","published":"2016-12-05 10:51:38","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.sakatakoichi.com%2Fentry%2F2016%2F12%2F05%2F105138\" title=\"How to get an application class loader in Java Agent method - Fight the Future\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_title":"Fight the Future","description":"In Java Agent method, such as premain() or agentmain(), class loader is system classloader, not application class loader. If you intent to change bytecode of class loaded by application class loader, you will need an application class loader. To get this, I think there is only one way. Get from Inst\u2026","version":"1.0"}