i need to change the access modifier of one constructor in a class file... how do i do it with jad..
thanks all...
raj...
i need to change the access modifier of one constructor in a class file... how do i do it with jad..
thanks all...
raj...
Solution with JAD:
javac
More simple solution:
Class<?> c = Class.forName("fully.qualified.name.of.your.Class");
ctor = c.getConstructor(...argument types here...);
ctor.setAccessible(true);
(Your IDE will suggest the type for ctor
... otherwise change it)
Now you can invoke the constructor at runtime.
If you really need to modify the byte code, have a look at the ASM library.