I am trying to use Jawishist for the first time, and I'm stuck. I have a standard standard in the default package. I'm trying to reload it using HotSwapper. I have tried it, but it does not work.
Public static zero major (string [] args throws exceptions {classpool pool = classpool.get default (); CtClass clazz = pool.get ("standard"); HotSpace Swap = New HotSpaper (8000); Swap.reload ("Standard", clazz.toBytecode ()); } I get this error
Exception in thread "main" java.lang.RuntimeException: No such class: standard on javassist.util. HotSwapper.toRefType (HotSwapper.java:189) at javassist.util.HotSwapper.reload (HotSwapper.java157) at JavaHacks.main (JavaHacks.java15) Jvw = transport = dt_socket, server = y, suspended = n, address = 8000
Strange part is this load class is just fine.
The strange part is that it loads the class properly.
You are probably talking about Javanese, but the fact is that the Javashiest class can read the file does not mean that the class was classed by JVM.
You should change your code from:
Public static zero principal (string [] args throws an exception {// Be sure to make standard class classification by making an example / ( Just like calling a static method. NIT () must also be) standard standard = new standard (); Standard.doSomething (); Classpool pool = classpool.gate default (); CtClass clazz = pool.get ("standard"); HotSpace Swap = New HotSpaper (8000); Swap.reload ("Standard", clazz.toBytecode ()); } will ensure that the standard class was loaded in the clutter, so it can be reloaded.
No comments:
Post a Comment