// get the app client main class
JarFile moduleFile = module.getModuleFile();
String mainClasss;
try {
Manifest manifest = moduleFile.getManifest();
if (manifest == null) {
throw new DeploymentException("App client module jar does not contain a manifest: " + moduleFile.getName());
}
mainClasss = manifest.getMainAttributes().getValue(Attributes.Name.MAIN_CLASS);
if (mainClasss == null) {
throw new DeploymentException("App client module jar does not have Main-Class defined in the manifest: " + moduleFile.getName());
}
String classPath = manifest.getMainAttributes().getValue(Attributes.Name.CLASS_PATH);
if (module.isStandAlone() && classPath != null) {
throw new DeploymentException("Manifest class path entry is not allowed in a standalone jar (JAVAEE 5 Section 8.2)");
}
} catch (IOException e) {
throw new DeploymentException("Could not get manifest from app client module: " + moduleFile.getName());