• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Major Version and Minor version

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how Major Version and Minor version of class format depend on jvm
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic