@ -20,3 +20,5 @@ mc -d /tmp/output /tmp/ClassA.java /tmp/ClassB.java
```
After compiling the `.class` file, you can use the [redefine](redefine.md) command to re-define the loaded classes in JVM.
> Note that the mc command may fail. If the compilation fails, the `.class` file can be compiled locally and uploaded to the server. Refer to the [redefine](redefine.md) command description for details.
The `mc` command may fail. You can modify the code locally, compile it, and upload it to the server. Some servers do not allow direct uploading files, you can use the `base64` command to bypass.
1. Convert the `.class` file to base64 first, then save it as result.txt
```bash
Base64 <Test.class> result.txt
```
2. Login the server, create and edit `result.txt`, copy the local content, paste and save
3. Restore `result.txt` on the server to `.class`
```
Base64 -d <result.txt> Test.class
```
4. Use the md5 command to verify that the `.class` files are consistent.