You can edit class files using specialized tools such as ASM or a binary editor.Depending on how you do it, you can make it inconsistent or destroy the structure of your files.
I have a question, is it possible that rewriting the class file generated by compiling the self-made code, loading the rewritten class file into the VM, and distributing it (for example, compiler provider)?
java
First of all, I'm not a legal expert.The following does not warrant any legal correctness.Please keep it as a reference.For strict legal interpretations, consult a copyrighted lawyer for your computer work.
Let's break it down into general stories and two implementations (Oracle JDK and OpenJDK) that can compile Java.
The so-called reverse assembling and decompiling can only be prohibited if the copyright owner prohibits it.It cannot be prohibited by a third party who is not a copyright holder.If some data is mechanically converted to another data based on certain rules, the copyright holder of the data before the change is responsible for the copyright of the converted data.Now, it is common to think that the copyright holder of the tool used for the conversion has copyright on the converted data.
For example, consider taking a picture with a digital camera and turning it into a JPEG file.In this case, the copyright of the JPEG file may be attributed to the author of the picture (secondary work); however, the person who took the photo may also be copyrighted to the JPEG file.However, copyright only occurs when ideas and emotions are expressed creatively, and if such elements are not included, the photographer is not considered copyrighted (note that the photographer can also be copyrighted if creative elements, backgrounds, angles, etc.).
Oracle JDK license (Japanese translation) does not see any claim or restriction on any data generated using JDK.Oracle claims copyright only for JDKs and their accompanying materials, not for output from JDKs.
OpenJDK uses GNU GPL with GPL link exception.GNU GPL considers non-rightful output.
Based on the above, the class file that compiled your code is considered copyrighted only to you, just like the original code, so no matter what you do, you will not violate any other rights.
© 2024 OneMinuteCode. All rights reserved.