• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

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: 24207
46
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic