Skip to content

Instantly share code, notes, and snippets.

View coolearn's full-sized avatar
🐯
On vacation

Simba coolearn

🐯
On vacation
View GitHub Profile
@rednaxelafx
rednaxelafx / DumpClassURL.java
Created December 7, 2011 05:48
Using the ProtectionDomain of an InstanceKlass to see where it was loaded from
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
public class DumpClassURL extends Tool {
public void run() {