io - reading java class files using java program -
i writing java code me read , print byte code in .class
file.
i have tried surfing internet, answers dont answer question.
below code have based on found on stackoverflow
private static void readbyte ( ) { path file = paths.get("bin/com/reading/frombyte/readfourbytes.class"); try { byte[] mybytes = files.readallbytes(file); for(byte b : mybytes) system.out.println((char)b); } catch (ioexception e) { e.printstacktrace(); } }
basically want interpret these bytes
human-readable characters.
thanks in advance
i think command you:
javap -verbose -c -private readfourbytes
Comments
Post a Comment