what are the differences between bytecode and executable code ?
I'm trying to figure it out but.. I can't find the differences
Printable View
what are the differences between bytecode and executable code ?
I'm trying to figure it out but.. I can't find the differences
Executable codes are machine native codes, lets just say, its the binary codes that tells ur computer what to do, the only language it understand
Bytecodes are an intermediary language, it lies somewhere between our close-to-human programming languages (the one that we write in source codes) and the machine binary codes
Java produce bytecodes when it is being compiled by javac, not executables
The bytecodes are used as input for the JVM, that creates the executable codes and send it to the computer
Hope this helps
Hi
I would like to know how to embed watermark in Java class file and decode that watermark class file to get back the watermark value.
I will be appreciate if any one can provide the source code.
I'hv tried many time to get the bytecode of the class file to embed the watermark value but failed. Should i used the class reader to read the class file but where i must to called the class file and how.
I include some code that i don't know where to get my .class inside this code:
package test;
import javax.swing.JOptionPane;
public class ClassLocationTest {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null, getClassLocation(String.class));
}
public static String getClassLocation(final Class<?> pClass) {
final String location, name;
name = pClass.getName().replaceAll("\\.", "/") + ".class";
location = ClassLoader.getSystemResource(name).getPath();
return location;
}
}
I hope any one can help me immediately because i must to submit it next week.
Thanks you
Azura