Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean has = false;
- JarFile f = null;
- try {
- f = new JarFile(directory + path);
- JarEntry entry = f.getJarEntry(file);
- has = entry != null;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- finally{
- if(f != null)
- try {
- f.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return has;
Add Comment
Please, Sign In to add comment