This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to know which JDK was used to compile a class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to know which JDK was used to compile a class?" Watch "How to know which JDK was used to compile a class?" New topic
Author

How to know which JDK was used to compile a class?

Nurat Lamos
Ranch Hand

Joined: Jan 03, 2003
Posts: 30
Hi,
I am in a situation where I need to know what JDK was used to compile a java source.
Is there a way we can do this?
Thanks,
Tarun
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
This is a class I threw together a while back. It just dumps the class file header (first 8 bytes of the file). I'm not sure what the previous version codes are, but 1.3 is 46.0 and 1.4 is 48.0.

[ June 23, 2003: Message edited by: Michael Morris ]

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Nurat Lamos
Ranch Hand

Joined: Jan 03, 2003
Posts: 30
Thanks a lot Michael..!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to know which JDK was used to compile a class?
 
Similar Threads
casting
Minimum JDK version to test the codes in Desktop Java Live
Bad version of the Servlet class
WebSphere deployment with Ant
How to find the jdk version used to compile a file