• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How does a JVM convert a java File into a Class File?

 
karthik Suryanarayanan
Ranch Hand
Posts: 121
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Could anyone help me how a JVM converts a java file into a Class file. What are the Types of Values it uses. Does those values will be declared in the class. Is there any Specific Format? Thank you So much..[/size]
 
Campbell Ritchie
Sheriff
Pie
Posts: 50168
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't convert a .java file to a .class file. That is done by the "compiler", javac. You can see the format of a .class file like this
javac MyFile.java
javap -c MyFile
It is much easier if MyFile is a very small file. You can find how to convert to a .class file from any standard compiler book.
 
karthik Suryanarayanan
Ranch Hand
Posts: 121
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Campbell & David. I went through the materials & will i have joined a long ago to this site but couldn't continue. Now onwards i hope i'll be here definitely with as much help and support from you guys & hope to do the Same to others. Once again thank you very much Ranchers.I am going to write my SCJP. Want inputs from you whether i could start from 1.5 or directly 1.6. Guide me with the specific topics so i could be more practised. And also some reference Materials.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15480
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
karthik Suryanarayanan wrote:I am going to write my SCJP. Want inputs from you whether i could start from 1.5 or directly 1.6. Guide me with the specific topics so i could be more practised. And also some reference Materials.

Do SCJP 6, it makes no sense to do the SCJP for Java 5 (because it's an older version).

For more information, see our SCJP FAQ. We also have an SCJP forum where you can ask all your questions related to the SCJP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic