[Java] Check the JDK version of the built war file

(Notes written by Java beginners)

There are times when you want to see what version of the JDK the Java war file was built with. In such a case, you can check with the following command. First, unzip the war file.

If the war file is unzipped in the document root of Tomcat, refer to the class file in it. For a locally existing war file, change the extension to zip and unzip the zip file.

example.war -> example.zip

After decompressing, use the cd command to move to the directory where the class file exists.

javap -v [Class file name]

In the execution result

major version: 52

If the output is, subtract 44 from that value.

52 - 44 = 8

So you can see that it was built with JDK version 8.

Recommended Posts

[Java] Check the JDK version of the built war file
[Java version] The story of serialization
Check the version of Cent OS
Check the contents of the Java certificate store
Java version check
Memo: [Java] Check the contents of the directory
Check the version of the standard Web software.
[Java] Check the number of occurrences of characters
How to find out the Java version of a compiled class file
JAVA: jar, aar, view the contents of the file
[Java] Access the signed URL of s3 (signed version 2)
Try the free version of Progate [Java II]
Try the free version of Progate [Java I]
Access the war file in the root directory of Tomcat
Check the behavior of Java Intrinsic Locks with bpftrace
[Java] Get the file in the jar regardless of the environment
Switch the version of bundler
Command to check the number and status of Java threads
Check the status of Java application without using monitoring tool
I want to find out which version of java the jar file I have is available
[Java] Delete the elements of List
Switch the version of java installed by SDKMAN when moving directories
[Rails] Check the contents of the object
Replace the contents of the Jar file
Unzip the zip file in Java
This and that of the JDK
Check the migration status of rails
Fix the file name of war to the one set in Maven
Get the public URL of a private Flickr file in Java
Read the first 4 bytes of the Java class file and output CAFEBABE
Overwrite upload of file with the same name with BOX SDK (java)
How to check for the contents of a java fixed-length string
Is the version of Elasticsearch you are using compatible with Java 11?
The origin of Java lambda expressions
How to get the length of an audio file in java
For the time being, run the war file delivered in Java with Docker
Examine the contents of the WAR file generated by the project created by Spring Initializr
[Rails] Check the instance variables and local variables of the file you are browsing
Sample program that returns the hash value of a file in Java
Check the domain by checking the MX record of the email address with java
[Java] Check if the character string is composed only of blanks (= Blank)
[Java] Get MimeType from the contents of the file with Apathce Tika [Kotlin]
About the version of Docker's Node.js image
[Java] How to use the File class
Check the contents of params with pry
Examine the memory usage of Java elements
[Java] Get the day of the specific day of the week
Installation of OMC APM Agent --Java version-
What is the best file reading (Java)
Compare the elements of an array (Java)
[day: 5] I summarized the basics of Java
What are the updated features of java 13
Easily measure the size of Java Objects
Looking back on the basics of Java
How to install the legacy version [Java]
Output of the book "Introduction to Java"
The story of writing Java in Emacs
Java: Place the ResourceBundle properties file anywhere
[Java8] Search the directory and get the file
[Java] [Spring] Test the behavior of the logger
# Java: vol1: [java / JDK version control best practice]