Created
February 11, 2016 02:30
-
-
Save hgadre/efd959ad1d0f1793b8b2 to your computer and use it in GitHub Desktop.
Check jar function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void checkJar() { | |
java.io.File jarFile = null; | |
try { | |
jarFile = new java.io.File("/var/lib/solr/tomcat-deployment/webapps/solr/WEB-INF/lib/antlr-runtime-3.5.jar"); | |
System.out.println("^^^^^^^^jar exists = " + jarFile.exists()); | |
System.out.println("^^^^^^^^jar canRead = " + jarFile.canRead()); | |
} catch ( Exception e ) { | |
e.printStackTrace(); | |
} | |
} | |
// After ServletFilter init(...) method, | |
// ^^^^^^^^jar exists = true | |
// ^^^^^^^^jar canRead = true | |
// After ServletFilter destroy(...) method, | |
// ^^^^^^^^jar exists = false | |
// ^^^^^^^^jar canRead = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment