Skip to content

Instantly share code, notes, and snippets.

@monoman
Created February 18, 2011 17:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monoman/834068 to your computer and use it in GitHub Desktop.
Save monoman/834068 to your computer and use it in GitHub Desktop.
A replacement .bat that works on windows (NT 4 and up) for JarCheck http://www.softpedia.com/get/Programming/Other-Programming-Files/JarCheck.shtml
@echo off
echo ===============================================================================================================
set TOP=%1
if not "%TOP%"=="" goto scanning
set TOP=1.5
:scanning
echo Checking for java classes with versions higher than %TOP% in all .jar files in the current directory
del jarcheck.log
FOR %%j IN (*.jar) DO java.exe -ea -jar %~d0%~p0\jarcheck.jar %%~fj 1.1 %TOP% 2>> jarcheck.log > null
echo ===============================================================================================================
echo Problems found (also at jarcheck.problems)
type jarcheck.log | grep -v OK | grep -v "Wrong" | grep -v "Checking jar" > jarcheck.problems
type jarcheck.problems
del jarcheck.log
echo ===============================================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment