int (Path apiJar) { try { try (ZipFile zipFile = new ZipFile(apiJar.toFile())) { ZipEntry entry = zipFile.getEntry(ApplicationStarter.class.getName().replace('.', '/') + ".class"); if (entry != null) { try (DataInputStream stream = new DataInputStream(zipFile.getInputStream(entry))) { if (stream.skip(6) == 6) { return stream.readUnsignedShort(); } } } } } catch (IOException e) { LOG.info(e); } return -1; }