aspose file tools*
The moose likes Java in General and the fly likes finding java compiler version of a war file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "finding java compiler version of a war file" Watch "finding java compiler version of a war file" New topic
Author

finding java compiler version of a war file

neha achrikar
Greenhorn

Joined: May 02, 2011
Posts: 3
I need to find the java compiler version whether java 5 or jave 6 of a war file that i have.
please help
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14433
    
  23

Welcome to the Ranch!

I don't think there is an easy way to find that out directly from a war file. However, you could look inside the war file for *.class files (in the WEB-INF/classes directory). This blog post explains how you can get the version number of a class file using javap (a tool that is included with the JDK). The version number tells you for which Java version the class file is compiled; for example 50 is Java 6, 49 is Java 5.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
neha achrikar
Greenhorn

Joined: May 02, 2011
Posts: 3
thanks a lot.....
got it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finding java compiler version of a war file