N
N
nevro2015-08-10 16:34:40
Java
nevro, 2015-08-10 16:34:40

Is the bytecode changed after compilation?

If so, why does the JVM need metadata? In c#, for example, an assembly stores bytecode, resources, and metadata.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
cthulhudx, 2015-08-10
@nevro

Metadata is stored in .class files, as well as in dll assemblies. They can be obtained using reflection.
For example:
Class className = Person.class;
Annotation[] annotations = className.getAnnotations();
PS - Java uses annotations to bind metadata, while C# uses attributes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question