1

I wanna modify remote runtime class file(Already loaded in JVM at remote server).
How many steps should I do? I know some APIs, such as Instrumentation, classfiletransformer, ASM, etc. I can modify a class file loacted at local hard disk, using ASM. I can get all names of current loaded classes in locate JVM, by attach JVM's PID. But, what's the next? Does it need to do socket programming to transfer remote classfile to local machine? And I am confusing about this. Any references or advices. thx for ur consideration.

1 Answer 1

0

Get the file from the remote server, modify it locally and push it back to the remote server. Getting the file from the remote server can be using FTP, HTTP or may be write a small socket server running on the reomte machine and a client on your machine.

About how will the class be reloaded in the JVM(since you said its already loaded), I have no idea :)

Sign up to request clarification or add additional context in comments.

3 Comments

Then how to get bytestream of class file which already loaded into JVM? I only get there are names now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.