• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Version of a class !!

 
P Srini
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a question about .class files.
Let us assume that we have a Temp.class file which we got by compiling Temp.java using some X version of java.
Now!! Is there any way to know, which version of jdk was used to compile this class?

Regards,
Srinivas.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try searching. This is one of the things which you would find.
 
P Srini
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks a Lot Campbell !!

Regards,
Srinivas.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, that is impossible. What Campbell points to lets you find out which Java version the class is compiled *for*. But you can't determine which Java version was used to do the compiling.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Ulf you are correct; I misunderstood the question.
 
P Srini
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what is the correct answer for this? Is it possible to get this information?
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P Srini wrote:So what is the correct answer for this? Is it possible to get this information?

Ulf has already answered your question:

Ulf Dittmer wrote:you can't determine which Java version was used to do the compiling
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic