Skip to content

fathzer/java-check-class-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-check-class-version

A command line tool to check the major version of classes contained in a jar.

Please note that it does not check that the classes are compatible with the java api of a specific version.

Requirements

It requires java 8+ JRE.

Download

The artifact is published in Maven Central.

Usage

'java -jar java-check-class-version-0.0.1.jar file version [options]'

file is the name of the jar file to check. version is the maximum major class version allowed.

Available options:

  • -i : module-info.class and package-info.class are ignored.
  • -j : The version parameter is not a major class version, but a java version.

The exit code of the command is 0 all classes successfully pass the test.

The following command will check compatibility with java 8:
'java -jar java-check-class-version-0.0.1.jar myjar.jar 8 -i -j'

The following command will check compatibility with java 11:
'java -jar java-check-class-version-0.0.1.jar myjar.jar 55'

Limitations

Multi release jar are not supported.

About

A command line tool to check the version of classes contained in a jar

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages