• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

How can we get the file version

 
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey i have 2 files in which one of files compiled by jdk1.4 version and the other jdk 1.5 versions the 2 files has same name..
my fnd uses jdk1.5

when i give him class file which was compiled by jdk 1.5 version he gets an error msg when ran with jdk1.4 version..
so is there any way to see the compiler version of a class file by which it is compiled???

thanking u all in advace
cinux
 
author and iconoclast
Posts: 24203
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
The "javap" program (in the JDK) can tell you this: try

javap -verbose com.package.ClassName

The class file version will be on one of the first few lines.
 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey it is displaying these line swhen i run tha javaprofiler tool

minor version: 0
major version: 0

is there nay other way to get the files version

thanx
 
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 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic