Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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
Posts: 53749
127
  • 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
Sheriff
Posts: 15860
80
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!