Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Major Version and Minor version Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Major Version and Minor version " Watch "Major Version and Minor version " New topic
Author

Major Version and Minor version

prasad Venkat
Ranch Hand

Joined: Oct 17, 2006
Posts: 32
how Major Version and Minor version of class format depend on jvm
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
major and minor version number are of the compiler which has been used for compiling the java source.I do not think it has to do anything with the JVM.Using a hex editor you can find the major and minor version of the javac which has been used for compilation.If you want to know these details from a class file then you might condider using apaches bcel (byte code engineering language )project.


Rahul Bhattacharjee
LinkedIn - Blog
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

These version numbers are relevant to the JVM in that class files with newer version numbers won't generally work with older JVMs. Each JVM will have some maximum class file version number that it understands; most famously, these days, JDK 1.4 doesn't know about version 49 class files produced by the Java 5 compiler which contain Java 5-specific code.

Rather than using BCEL (no longer current; it's been superceded by "ASM") or a hex editor, the "javap" tool in the JDK can tell you the version numbers in a class file.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Major Version and Minor version
 
Similar Threads
jdbc version?
major and minor version of java class
How can we get the file version
Given a class file, which JDK was used?
java.sql.SQLException: ORA-03115: unsupported network datatype or representation