changeset 341:be0c0e2d0d31

8164832: javapackager testsuite modifications for below mentioned issues Reviewed-by: cbensen
author rgangadhar
date Mon, 10 Oct 2016 20:56:50 +0530
parents b743144c5e11
children bf6ae1d345ce
files functional/appBundlerTestsJDK9/appBundlerTestsJDK9/build.xml functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/build-impl.xml functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/project.properties functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/AntBundlingManager.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/AppWrapper.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/BundlingManager.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Config.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/ConsoleBundlingManager.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Constants.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/JavaApiBundlingManager.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/SourceFactory.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Utils.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/AbstractBundlerUtils.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/LinuxAbstractBundlerUtils.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/MacAbstractBundlerUtils.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/MacPKGBundlerUtils.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/WinAbstractBundlerUtils.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/resources/MacRmApp.java.template functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/resources/com.rm.module.info.template functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSAutoInstallTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSCustomClassesTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSInstallTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/DefaultClassPathTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/FileAssociationTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/IconTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/InstallDirTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/LicenseFileTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/TestBase.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/AddModuleTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/CheckExecutablesAvailableTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/LimitModuleTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/ListServiceProvidersTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleBundledWithMinimumModulesAnd3rdPartyJarsTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleBundledWithMinimumModulesAnd3rdPartyModulesTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleWithEntireJreTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleWithMinimumModulesTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/UnnamedModuleDependsOn3rdPartyModulesBundledWithEntireJreTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/ExplodedModuleParameters.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/JmodParameters.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/ModularJarParameters.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/NormalJarParameters.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeAppInfoParametersTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeCommandLineArgumentsTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeJvmOptionsTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeMainClassTest.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/loading/BundlerLoadingTest.java
diffstat 47 files changed, 596 insertions(+), 214 deletions(-) [+]
line wrap: on
line diff
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/build.xml	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/build.xml	Mon Oct 10 20:56:50 2016 +0530
@@ -170,8 +170,16 @@
 			</not>
 		</condition>
 
+		<condition property="noclean" value="false">
+			<not>
+				<isset property="noclean" />
+			</not>
+		</condition>
+
+		<echo>You may avoid cleaning up bundles and temporary directory by passing -Dnoclean=true</echo>
+
 		<property name="run.jvmargs" value="-Dtest-run-mode=single-method -Dinstallation-package-type=${installation-package-type} -Dpackager-interface=${packager-interface} -Djava-extension-type=${java-extension-type}
-			-Dmanual-only=${manual-only}" />
+			-Dmanual-only=${manual-only} -Dnoclean=${noclean}" />
 
 		<antcall target="-do-compile-single">
 			<param  name="javac.includes" value="${class-name}" />
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/build-impl.xml	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/build-impl.xml	Mon Oct 10 20:56:50 2016 +0530
@@ -156,6 +156,7 @@
         <property name="application.args" value=""/>
         <property name="source.encoding" value="${file.encoding}"/>
         <property name="runtime.encoding" value="${source.encoding}"/>
+    	<property name="noclean" value="false"/>
         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
             <and>
                 <isset property="javadoc.encoding"/>
@@ -458,7 +459,7 @@
             	<echo>======================================================</echo>
             	<echo>===============TESTNG EXECUTION BEGINS================</echo>
             	<echo>======================================================</echo>
-            	<echoproperties destfile="abc.properties"/>
+            	<echoproperties destfile="allproperties.properties"/>
                 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
                 <testng classfilesetref="test.set" configFailurePolicy="continue" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="appBundlerTests" testname="TestNGtests" workingDir="${work.dir}" dumpCommand="true">
                     <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
@@ -801,6 +802,10 @@
                 	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.packager.bundlers=ALL-UNNAMED"/>
                 	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.resource=ALL-UNNAMED"/>
                 	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager.services/jdk.packager.services=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.linux=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.windows=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.mac=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.jnlp=ALL-UNNAMED"/>
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/project.properties	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/project.properties	Mon Oct 10 20:56:50 2016 +0530
@@ -81,3 +81,4 @@
 source.encoding=UTF-8
 src.dir=src
 test.src.dir=test
+noclean=false
\ No newline at end of file
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/AntBundlingManager.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/AntBundlingManager.java	Mon Oct 10 20:56:50 2016 +0530
@@ -158,15 +158,19 @@
                 Element parentEl = ant.get(location.element);
                 switch (key) {
                 case "appResources": {
-                    RelativeFileSet relFileSet = (RelativeFileSet) value;
-                    Element e = document.createElement("fx:fileset");
-                    e.setAttribute("dir",
-                            relFileSet.getBaseDirectory().getAbsolutePath());
-                    e.setAttribute("includes", relFileSet.getIncludedFiles()
-                            .stream().collect(joining(",")));
-                    parentEl.appendChild(e);
+                    if(ExtensionType.NormalJar == extensionType) {
+                        RelativeFileSet relFileSet = (RelativeFileSet) value;
+                        Element e = document.createElement("fx:fileset");
+                        e.setAttribute("dir",
+                                relFileSet.getBaseDirectory().getAbsolutePath());
+                        e.setAttribute("includes", relFileSet.getIncludedFiles()
+                                .stream().collect(joining(",")));
+                        parentEl.appendChild(e);
+                    }
                     break;
                 }
+                case "appResourcesList":
+                    break;
                 case "licenseFile": {
                     String file = (String) value;
                     Element e = document.createElement("fx:fileset");
@@ -238,10 +242,13 @@
                             break;
 
                             default:
-                                launcherEl.appendChild(
-                                        createBundleArgumentEntry(document,
-                                                keyVal.getKey(),
-                                                keyVal.getValue()));
+                                Element bundlerArgumentEntry = createBundleArgumentEntry(document,
+                                        keyVal.getKey(),
+                                        keyVal.getValue());
+                                if(bundlerArgumentEntry != null) {
+                                    launcherEl.appendChild(
+                                            bundlerArgumentEntry);
+                                }
                             }
                         }
 
@@ -319,8 +326,11 @@
                     break;
                 }
             } else {
-                fxDeploy.appendChild(
-                        createBundleArgumentEntry(document, key, value));
+                Element bundleArgumentEntry = createBundleArgumentEntry(document, key, value);
+                if(bundleArgumentEntry != null) {
+                    fxDeploy.appendChild(
+                            bundleArgumentEntry);
+                }
             }
         }
     }
@@ -342,18 +352,21 @@
 
     private Element createBundleArgumentEntry(Document document, String argName,
             Object value) throws IOException {
+        if ("appResourcesList".equals(argName)) {
+            return null;
+        }
         Element bundleArgument = document.createElement("fx:bundleArgument");
-        String argValue;
+        String argValue = null;
         if ("mainJar".equals(argName)) {
-            RelativeFileSet fileSet = (RelativeFileSet) value;
-            argValue = fileSet.getIncludedFiles().iterator().next();
+//            RelativeFileSet fileSet = (RelativeFileSet) value;
+//            argValue = fileSet.getIncludedFiles().iterator().next();
+            argValue = (String) value;
         } else {
             checkValue(value);
             argValue = value.toString();
         }
         bundleArgument.setAttribute("arg", argName);
         bundleArgument.setAttribute("value", argValue);
-
         return bundleArgument;
     }
 
@@ -422,7 +435,7 @@
             throw new IllegalArgumentException(
                     "Invalid bundle directory : " + file);
         }
-        fxDeploy.setAttribute("outdir", file.getParentFile().getAbsolutePath());
+        fxDeploy.setAttribute("outdir", file.getAbsolutePath());
         fxDeploy.setAttribute("outfile", "test");
         fxDeploy.setAttribute("verbose", "true");
         appendToFXDeploy(document, fxDeploy, params);
@@ -439,6 +452,12 @@
     @Override
     public File execute(Map<String, Object> params, File file)
             throws IOException {
+       return execute(params, file, false);
+    }
+
+    @Override
+    public File execute(Map<String, Object> params, File file,
+            boolean isSrcDirRequired) throws IOException {
         try {
             Data data = createDocument();
             Element fxDeploy = fxDeploy(data.document, params, file);
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/AppWrapper.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/AppWrapper.java	Mon Oct 10 20:56:50 2016 +0530
@@ -9,6 +9,7 @@
 import static java.nio.file.Files.newDirectoryStream;
 import static java.util.stream.Collectors.joining;
 import static java.util.stream.Collectors.toList;
+import static java.util.stream.Collectors.toSet;
 
 import java.io.ByteArrayOutputStream;
 import java.io.File;
@@ -31,7 +32,6 @@
 import java.util.concurrent.ExecutionException;
 import java.util.jar.Attributes;
 import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
 import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
 import java.util.logging.Level;
@@ -43,6 +43,8 @@
 import javax.tools.JavaCompiler;
 import javax.tools.ToolProvider;
 
+import com.oracle.tools.packager.RelativeFileSet;
+
 import javafx.util.Pair;
 
 /**
@@ -180,15 +182,28 @@
         return compileApp(new String[0], extension, classpath);
     }
 
-    private int compileApp(String[] javacOptions, ExtensionType extension,
-            Path... classpath) throws IOException {
-        int resultForModule = compileAppForModules(javacOptions, extension,
-                classpath);
-        int resultForJar = compileAppForJars(javacOptions, extension,
-                classpath);
+    public int compileApp(String[] javacOptions, ExtensionType extension,
+            Path... classpath) throws IOException, RuntimeException {
+        int resultForModule = 0;
+        int resultForJar = 0;
+        if(extension != null) {
+            switch (extension) {
+            case ExplodedModules:
+            case Jmods:
+            case ModularJar:
+                resultForModule = compileAppForModules(javacOptions, extension,
+                        classpath);
+                break;
+            default:
+                resultForJar = compileAppForJars(javacOptions, extension,
+                        classpath);
+                break;
+            }
+        }
+
         int result = 0;
-        if (resultForJar < 0 || resultForModule < 0) {
-            result = -1;
+        if (resultForJar != 0 || resultForModule != 0) {
+            throw new RuntimeException("Compilation Failed for Module or Normal Package");
         }
         return result;
     }
@@ -251,7 +266,7 @@
             }
 
             if (extension != null) {
-                newArgs.add("-mp");
+                newArgs.add(DOUBLE_HYPHEN+MODULEPATH);
                 newArgs.add(String.join(File.pathSeparator,
                         getModulePathBasedOnExtension(extension),
                         JMODS_PATH_IN_JDK));
@@ -273,12 +288,12 @@
             });
             ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
             LOG.log(Level.INFO,
-                    "====================COMPILATION STARTS FOR NORMAL JAR===========================");
+                    "====================COMPILATION STARTS for NORMAL JAR for package:: "+string+"===========================");
             LOG.log(Level.INFO, "compilation command for jars is " + newArgs);
             result = compiler.run(System.in, outputStream, System.err,
                     newArgs.toArray(new String[newArgs.size()]));
             LOG.log(Level.INFO,
-                    "====================COMPILATION ENDS FOR NORMAL JAR=============================");
+                    "====================COMPILATION ENDS for NORMAL JAR for package:: "+string+"===========================");
         }
         return result;
     }
@@ -300,7 +315,7 @@
                 }
             }
 
-            argsList.add("-mp");
+            argsList.add(DOUBLE_HYPHEN + MODULEPATH);
             argsList.add(String.join(File.pathSeparator, getBinDir().toString(),
                     JMODS_PATH_IN_JDK));
             argsList.add("-d");
@@ -327,30 +342,32 @@
             ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
             if (extension != null) {
                 LOG.log(Level.INFO,
-                        "====================COMPILATION STARTS FOR "
-                                + extension + " ===========================");
+                        "====================COMPILATION STARTS for module "+
+                                source.getModuleName() +" for extension "  +extension + " ===========================");
                 LOG.log(Level.INFO, "compilation command for " + extension
                         + " is " + argsList);
             } else {
                 LOG.log(Level.INFO,
-                        "compilation command for modules is " + argsList);
+                        "compilation command for module "+source.getModuleName() +" is " + argsList);
             }
 
             int tempResult = compiler.run(System.in, outputStream, System.err,
                     argsList.toArray(new String[argsList.size()]));
             if (tempResult != 0) {
-                result = tempResult;
+                throw new RuntimeException("Module Compilation failed for "+source.getModuleName());
             }
             String out = outputStream.toString();
             if (!out.trim().isEmpty()) {
                 LOG.log(Level.INFO, out);
             }
             if (extension != null) {
-                LOG.log(Level.INFO, "===================COMPILATION ENDS FOR "
-                        + extension + " ==============================");
+                LOG.log(Level.INFO,
+                        "====================COMPILATION ENDS for module "+
+                                source.getModuleName() +" for extension"  +extension + " ===========================");
             } else {
                 LOG.log(Level.INFO,
-                        "===================COMPILATION ENDS===================");
+                        "====================COMPILATION ENDS for module "+
+                                source.getModuleName());
             }
             LOG.log(Level.INFO, "\n");
         }
@@ -537,10 +554,10 @@
             command.add(getJmodsDir() + File.separator + source.getModuleName()
                     + ".jmod");
             System.out.println(
-                    "=========================JMOD CREATION STARTS=========================");
+                    "=========================JMOD CREATION STARTS For Module "+source.getModuleName()+" =========================");
             Utils.runCommand(command, CONFIG_INSTANCE.getInstallTimeout());
             System.out.println(
-                    "=========================JMOD CREATION ENDS===========================");
+                    "=========================JMOD CREATION ENDS For Module "+source.getModuleName()+" ===========================");
             System.out.println();
         }
     }
@@ -572,27 +589,26 @@
             command.add(moduleAbsouleDirectoryPath);
             command.add(".");
             System.out.println(
-                    "====================MODULAR JAR CREATION STARTS==================");
-            Utils.runCommand(command, CONFIG_INSTANCE.getInstallTimeout());
+                    "====================MODULAR JAR CREATION STARTS For "+ source.getJarName() +"==================");
+            ProcessOutput output = Utils.runCommand(command, CONFIG_INSTANCE.getInstallTimeout());
+            if( output.exitCode() != 0) {
+                throw new RuntimeException("Modular Jar Creation failed for module "+source.getJarName());
+            }
             System.out.println(
-                    "====================MODULAR JAR CREATION ENDS====================");
+                    "====================MODULAR JAR CREATION ENDS For "+ source.getJarName() +"==================");
             System.out.println();
         }
     }
 
-    public String getIdentifier() {
-        try (JarFile mainJar = new JarFile(getMainJarFile().toFile());) {
-            Manifest manifest = mainJar.getManifest();
-            for (Map.Entry<Object, Object> entry : manifest.getMainAttributes()
-                    .entrySet()) {
-                if (entry.getKey().toString().equals("Main-Class")) {
-                    return entry.getValue().toString();
-                }
-            }
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
+    public String getIdentifier(ExtensionType extension) {
+        switch (extension) {
+        default:
+            return getMainClass();
+        case ExplodedModules:
+        case Jmods:
+        case ModularJar:
+            return String.join("/", getMainModuleName(), getMainClass());
         }
-        return "";
     }
 
     public String getAllModuleNamesSeparatedByPathSeparator() {
@@ -605,6 +621,12 @@
                 .collect(Collectors.joining(","));
     }
 
+    public String getAllModuleNamesSeperatedByCommaExceptMainmodule() {
+        return getModuleTempSources().stream()
+                .filter(source -> !source.isMainModule())
+                .map(Source::getModuleName).collect(Collectors.joining(","));
+    }
+
     public List<String> getAllModuleNamesAsList() {
         return getModuleTempSources().stream().map(Source::getModuleName)
                 .collect(Collectors.toList());
@@ -636,4 +658,50 @@
             return getJarDir().toString();
         }
     }
+
+    public Path getJavaExtensionPathBasedonExtension(ExtensionType extension) {
+        if (extension == null) {
+            throw new NullPointerException("Extension cannot be null");
+        }
+        switch (extension) {
+        case ModularJar:
+            return getModularJarsDir();
+        case ExplodedModules:
+            return getExplodedModsDir();
+        case Jmods:
+            return getJmodsDir();
+        default:
+            return getJarDir();
+        }
+    }
+
+    public RelativeFileSet getRelativeFileSetBasedOnExtension(
+            ExtensionType extension) throws IOException {
+        RelativeFileSet relativeFileSet = null;
+        Path javaExtensionDirPath = this
+                .getJavaExtensionPathBasedonExtension(extension);
+        switch (extension) {
+        case NormalJar:
+            relativeFileSet = new RelativeFileSet(javaExtensionDirPath.toFile(),
+                    this.getJarFilesList().stream().map(Path::toFile)
+                            .collect(toSet()));
+            break;
+        case ExplodedModules:
+            relativeFileSet = new RelativeFileSet(javaExtensionDirPath.toFile(),
+                    this.getExplodedModFileList().stream().map(Path::toFile)
+                            .collect(toSet()));
+            break;
+        case Jmods:
+            relativeFileSet = new RelativeFileSet(javaExtensionDirPath.toFile(),
+                    this.getJmodFileList().stream().map(Path::toFile)
+                            .collect(toSet()));
+            break;
+        case ModularJar:
+            relativeFileSet = new RelativeFileSet(javaExtensionDirPath.toFile(),
+                    this.getModularJarFileList().stream().map(Path::toFile)
+                            .collect(toSet()));
+            break;
+        }
+        return relativeFileSet;
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/BundlingManager.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/BundlingManager.java	Mon Oct 10 20:56:50 2016 +0530
@@ -23,7 +23,7 @@
  */
 public abstract class BundlingManager implements Constants {
 
-    private static final Logger LOG = Logger
+    protected static final Logger LOG = Logger
             .getLogger(BundlingManager.class.getName());
 
     private boolean installed = false;
@@ -42,6 +42,9 @@
     public abstract File execute(Map<String, Object> params, File file)
             throws IOException;
 
+    public abstract File execute(Map<String, Object> params, File file,
+            boolean isSrcDirRequired) throws IOException;
+
     public Path execute(Map<String, Object> params, AppWrapper app)
             throws IOException {
         this.app = app;
@@ -50,6 +53,14 @@
         return execute(params, bundlesDir.toFile()).toPath();
     }
 
+    public Path execute(Map<String, Object> params, AppWrapper app,
+            boolean isSrcDirRequired) throws IOException {
+        this.app = app;
+        LOG.log(Level.INFO, "Bundling with params: {0}.", params);
+        Path bundlesDir = app.getBundlesDir();
+        return execute(params, bundlesDir.toFile(), isSrcDirRequired).toPath();
+    }
+
     public Bundler getBundler() {
         return bundlerUtils.getBundler();
     }
@@ -129,7 +140,7 @@
     }
 
     public Path getAppCDSCacheFile(AppWrapper app, String appName) {
-        return bundlerUtils.getAppCDSCacheFile(app, appName);
+        return bundlerUtils.getAppCDSCacheFile(app, appName, extensionType);
     }
 
     public AbstractBundlerUtils getBundlerUtils() {
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Config.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Config.java	Mon Oct 10 20:56:50 2016 +0530
@@ -233,6 +233,14 @@
         return this.javaExtensionType;
     }
 
+    public boolean isNoCleanSet() {
+        String nocleanProperty = System.getProperty("noclean");
+        if(nocleanProperty == null) {
+            return false;
+        }
+        return nocleanProperty.equalsIgnoreCase("true");
+    }
+
     public boolean manualOnly() {
         return manualOnly;
     }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/ConsoleBundlingManager.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/ConsoleBundlingManager.java	Mon Oct 10 20:56:50 2016 +0530
@@ -103,7 +103,12 @@
     @Override
     public File execute(Map<String, Object> params, File file)
             throws IOException {
+       return execute(params, file, false);
+    }
 
+    @Override
+    public File execute(Map<String, Object> params, File file,
+            boolean isSrcDirRequired) throws IOException {
         try {
             List<String> command = command(file, toConsole(params));
             System.out.println("execution command is " + command);
@@ -130,7 +135,7 @@
         command.addAll(Arrays.asList(
                 CONFIG_INSTANCE
                         .javafxpackager()  ,
-                "-deploy", "-verbose", "-outdir", file.getParent(),
+                "-deploy", "-verbose", "-outdir", file.toString(),
                 // mandatory option
                 "-outfile", "test", "-native",
                 "image".equalsIgnoreCase(bundlerType) ? "image"
@@ -144,6 +149,7 @@
                 value.stream().forEach(option -> command.add(option));
             } else if ((DOUBLE_HYPHEN + STRIP_NATIVE_COMMANDS).equals(key)) {
                 command.add(key);
+                command.add(value.iterator().next());
             } else {
                 command.add(key);
                 command.add(
@@ -163,11 +169,13 @@
             RelativeFileSet fileSet;
             switch (key) {
             case "appResources":
-                fileSet = (RelativeFileSet) value;
-                String path = fileSet.getBaseDirectory().getPath();
-                key2Value.add(new Pair<>("-srcdir", Arrays.asList(path)));
-                key2Value.add(
-                        new Pair<>("-srcfiles", fileSet.getIncludedFiles()));
+                if(ExtensionType.NormalJar == extensionType) {
+                    fileSet = (RelativeFileSet) value;
+                    String path = fileSet.getBaseDirectory().getPath();
+                    key2Value.add(new Pair<>("-srcdir", Arrays.asList(path)));
+                    key2Value.add(
+                            new Pair<>("-srcfiles", fileSet.getIncludedFiles()));
+                }
                 break;
             case "jvmOptions":
                 Collection<String> col = (Collection<String>) value;
@@ -198,8 +206,8 @@
                 break;
             case "mainJar":
                 // Use relative references
-                fileSet = (RelativeFileSet) value;
-                String jar = new ArrayList<>(fileSet.getIncludedFiles()).get(0);
+//                fileSet = (RelativeFileSet) value;
+                String jar = (String) value;
                 key2Value.add(new Pair<>(getMappedKeyAndCheck(key),
                         Arrays.asList(jar)));
                 break;
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Constants.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Constants.java	Mon Oct 10 20:56:50 2016 +0530
@@ -135,6 +135,7 @@
     String MAIN_MODULE = "module";
     String APP1_NAME = "App1";
     String APP_RESOURCES = "appResources";
+    String APP_RESOURCES_LIST ="appResourcesList";
     String COPYRIGHT_VALUE = "Copyright (c) 2011, 2016 Oracle and/or its affiliates. All rights reserved.";
     String LICENSE_TYPE_VALUE = "SQE GPL v.100.500";
     String PASS_2 = "PASS_2";
@@ -142,9 +143,6 @@
     String APP2_NAME = "App2";
     String APP3_NAME = "App3";
     String packageName = "testapp";
-    /*
-     * MODULE RELATED PARAMETERS in AppWrapper
-     */
     String BUNDLES = "bundles";
     String SOURCE = "src";
     String BIN = "bin";
@@ -157,5 +155,6 @@
     String DOUBLE_HYPHEN ="--";
     String RUNTIME = "runtime";
     String MODULE_INFO_DOT_JAVA = "module-info.java";
+    String ADD_EXPORTS = "add-exports";
 
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/JavaApiBundlingManager.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/JavaApiBundlingManager.java	Mon Oct 10 20:56:50 2016 +0530
@@ -6,10 +6,13 @@
 package com.oracle.appbundlers.utils;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.Map;
+import java.util.logging.Level;
 
 import com.oracle.appbundlers.utils.installers.AbstractBundlerUtils;
 import com.oracle.tools.packager.ConfigException;
+import com.oracle.tools.packager.RelativeFileSet;
 import com.oracle.tools.packager.UnsupportedPlatformException;
 
 /**
@@ -25,16 +28,31 @@
     @Override
     public boolean validate(Map<String, Object> params)
             throws UnsupportedPlatformException, ConfigException {
+
         return getBundler().validate(params);
     }
 
     @Override
-    public File execute(Map<String, Object> params, File file) {
-        return getBundler().execute(params, file);
+    public File execute(Map<String, Object> params, File file) throws IOException {
+        return execute(params, file, false);
     }
 
     @Override
     public String getShortName() {
         return "JAVA-API";
     }
+
+    @Override
+    public File execute(Map<String, Object> params, File file,
+            boolean isSrcDirRequired) throws IOException {
+
+        if(ExtensionType.NormalJar == extensionType || isSrcDirRequired) {
+            Object object = params.get("appResources");
+            RelativeFileSet fileSet = (RelativeFileSet) object;
+            String srcDirPath = fileSet.getBaseDirectory().getPath();
+            params.put("srcdir", srcDirPath);
+            LOG.log(Level.INFO, "Bundling with params after adding srcdir to params: {0}.", params);
+        }
+        return getBundler().execute(params, file);
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/SourceFactory.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/SourceFactory.java	Mon Oct 10 20:56:50 2016 +0530
@@ -203,6 +203,26 @@
     }
 
     /*
+     * com.shape.serviceinterface module
+     */
+    public static Source get_com_shape_serviceinterface_module(boolean isMainModule)
+            throws IOException {
+        String mainClassFullNameInternal = COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME;
+        Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>();
+        classNameToTemplateMapInternal.put(COM_SHAPE_SERVICEINTERFACE_SHAPE_CLASS_NAME,
+                COM_SHAPE_SERVICEINTERFACE_SHAPE_TEMPLATE
+                );
+
+        return new Source(COM_SHAPE_SERVICEINTERFACE_MODULE_NAME,
+                COM_SHAPE_SERVICEINTERFACE_MODULE_INFO_TEMPLATE,
+                classNameToTemplateMapInternal, mainClassFullNameInternal,
+                COM_SHAPE_SERVICEINTERFACE_MODULE_NAME, Collections.emptyMap(),
+                isMainModule);
+    }
+
+
+
+    /*
      * com.shape.serviceprovider.circle module
      */
 
@@ -244,7 +264,7 @@
      * com.shape.test module
      */
 
-    public static Source get_com_shape_test_module() throws IOException {
+    public static Source get_com_shape_test_module(boolean isMainModule) throws IOException {
         Map<String, String> classNameToTemplateMapInternal = new HashMap<String, String>();
         classNameToTemplateMapInternal.put(COM_SHAPE_TEST_LIMITMODSMAINCLASS,
                 COM_SHAPE_TEST_LIMITMODSMAINCLASS_TEMPLATE
@@ -254,7 +274,7 @@
                 COM_SHAPE_TEST_MODULE_INFO_TEMPLATE,
                 classNameToTemplateMapInternal,
                 COM_SHAPE_TEST_LIMITMODSMAINCLASS, COM_SHAPE_TEST_MODULE_NAME,
-                Collections.emptyMap());
+                Collections.emptyMap(), isMainModule);
     }
 
     /*
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Utils.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Utils.java	Mon Oct 10 20:56:50 2016 +0530
@@ -97,7 +97,7 @@
             po.waitFor(timeout, TimeUnit.MILLISECONDS);
             LOG.log(Level.INFO,
                     "Command \"{0}\"... finished with exit code \"{1}\"",
-                    new Object[] { cmd.get(0), po.exitCode() });
+                    new Object[] { cmd, po.exitCode() });
             return po;
         } catch (InterruptedException e) {
             throw new IOException(e);
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/AbstractBundlerUtils.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/AbstractBundlerUtils.java	Mon Oct 10 20:56:50 2016 +0530
@@ -30,11 +30,14 @@
 import java.util.logging.Logger;
 import java.util.stream.Stream;
 
+import javax.management.RuntimeErrorException;
+
 import org.testng.Assert;
 
 import com.oracle.appbundlers.utils.AppWrapper;
 import com.oracle.appbundlers.utils.BundlerUtils;
 import com.oracle.appbundlers.utils.Constants;
+import com.oracle.appbundlers.utils.ExtensionType;
 import com.oracle.appbundlers.utils.ProcessOutput;
 import com.oracle.appbundlers.utils.Utils;
 import com.oracle.tools.packager.Bundler;
@@ -388,18 +391,16 @@
 
         verificators.put(CHECK_MODULE_IN_JAVA_EXECUTABLE,
                 (value, app, appName) -> {
-                    Path installedAppRootLocation = getInstalledAppRootLocation(
-                            app, appName);
                     List<String> stringList = new ArrayList<String>();
+                    Path binPath = getJavaExecutableBinPathInInstalledApp(app, appName);
                     String joinedString = String.join(File.separator,
-                            installedAppRootLocation.toString(), "runtime",
-                            "bin", "java");
+                            binPath.toString(),  getJavaExecutable());
                     stringList.add(joinedString);
-                    stringList.add("-listmods");
+                    stringList.add(DOUBLE_HYPHEN + LIST_MODULES);
 
                     try {
                         ProcessOutput processOutput = Utils
-                                .runCommand(stringList, 1000);
+                                .runCommand(stringList, CONFIG_INSTANCE.getRunTimeout());
                         if (value instanceof List) {
                             List<String> list = (List) value;
                             checkOutputContains(processOutput, list);
@@ -414,19 +415,11 @@
 
         verificators.put(CHECK_EXECUTABLES_AVAILABLE_IN_BIN,
                 (value, app, appName) -> {
-                    Path installedAppRootLocation = getInstalledAppRootLocation(
-                            app, appName);
-                    String joinedString = String.join(File.separator,
-                            installedAppRootLocation.toString(), "runtime",
-                            "bin");
+                    Path binPath = getJavaExecutableBinPathInInstalledApp(app, appName);
                     try {
-                        /*
-                         * need to change "exe" to platform independent format.
-                         */
-                        findByExtension(Paths.get(joinedString), "exe",
-                                ROOT_DIRECTORY_DEPTH);
+                        checkIfExecutablesAvailableInBinDir(binPath);
                     } catch (Exception e) {
-                        throw new RuntimeException(e);
+                       throw new RuntimeException(e);
                     }
                 });
     }
@@ -444,6 +437,8 @@
         bundler = bundlers.get(0);
     }
 
+    public abstract void checkIfExecutablesAvailableInBinDir(Path binPath) throws FileNotFoundException, IOException;
+
     public Bundler getBundler() {
         return bundler;
     }
@@ -579,9 +574,13 @@
         return StandardBundlerParam.APP_NAME.fetchFrom(params);
     }
 
-    abstract public Path getAppCDSCacheFile(AppWrapper app, String appName);
+    abstract public Path getAppCDSCacheFile(AppWrapper app, String appName, ExtensionType extensionType);
 
     public String[] getRmCommand(Path file) {
         return new String[] { "sudo", "/bin/rm", file.toString() };
     };
+
+    public abstract Path getJavaExecutableBinPathInInstalledApp(AppWrapper appWrapper, String appTitle);
+
+    public abstract String getJavaExecutable();
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/LinuxAbstractBundlerUtils.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/LinuxAbstractBundlerUtils.java	Mon Oct 10 20:56:50 2016 +0530
@@ -17,6 +17,7 @@
 import static org.testng.Assert.assertTrue;
 
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -24,12 +25,15 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.concurrent.ExecutionException;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.regex.Pattern;
 
 import com.oracle.appbundlers.utils.AppWrapper;
 import com.oracle.appbundlers.utils.BundlerUtils;
+import com.oracle.appbundlers.utils.ExtensionType;
 import com.oracle.appbundlers.utils.ProcessOutput;
 import com.oracle.appbundlers.utils.Utils;
 
@@ -217,8 +221,30 @@
     }
 
     @Override
-    public Path getAppCDSCacheFile(AppWrapper app, String appName) {
-        return Paths.get(System.getenv("HOME"), ".local", app.getIdentifier(),
-                "cache", appName + ".jpa");
+    public Path getAppCDSCacheFile(AppWrapper app, String appName,
+            ExtensionType extension) {
+        return Paths.get(System.getenv("HOME"), ".local",
+                app.getIdentifier(extension), "cache", appName + ".jpa");
     };
+
+    public Path getJavaExecutableBinPathInInstalledApp(AppWrapper appWrapper,
+            String appTitle) {
+        return getInstalledAppRootLocation(appWrapper, appTitle).resolve("runtime/bin");
+    }
+
+    @Override
+    public void checkIfExecutablesAvailableInBinDir(Path binDirPath) throws IOException {
+        Optional<Path> result = Files.find(binDirPath, 1, (file, attr) -> file
+                .toFile().getName().equals("java")).findFirst();
+        if (!result.isPresent()) {
+            throw new FileNotFoundException("java"
+                    + " not found under " + binDirPath );
+        }
+        LOG.log(Level.INFO, "java executable found in {0}", binDirPath);
+    }
+
+    @Override
+    public String getJavaExecutable() {
+        return "java";
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/MacAbstractBundlerUtils.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/MacAbstractBundlerUtils.java	Mon Oct 10 20:56:50 2016 +0530
@@ -10,13 +10,16 @@
 import static org.testng.Assert.assertTrue;
 
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -29,6 +32,7 @@
 
 import com.oracle.appbundlers.utils.AppWrapper;
 import com.oracle.appbundlers.utils.BundlerUtils;
+import com.oracle.appbundlers.utils.ExtensionType;
 import com.oracle.appbundlers.utils.ProcessOutput;
 import com.oracle.appbundlers.utils.Utils;
 
@@ -275,8 +279,34 @@
     }
 
     @Override
-    public Path getAppCDSCacheFile(AppWrapper app, String appName) {
+    public Path getAppCDSCacheFile(AppWrapper app, String appName,
+            ExtensionType extensionType) {
         return Paths.get(System.getenv("HOME"), "Library/Application Support",
-                app.getIdentifier(), "cache", appName + ".jpa");
+                app.getIdentifier(extensionType), "cache", appName + ".jpa");
     };
+
+    @Override
+    public Path getJavaExecutableBinPathInInstalledApp(AppWrapper appWrapper,
+            String appTitle) {
+        Path installedAppRootLocation = getInstalledAppRootLocation(appWrapper,
+                appTitle);
+        return installedAppRootLocation
+                .resolve("Contents/PlugIns/Java.runtime/Contents/Home/bin");
+    }
+
+    @Override
+    public void checkIfExecutablesAvailableInBinDir(Path binDirPath) throws IOException {
+        Optional<Path> result = Files.find(binDirPath, 1, (file, attr) -> file
+                .toFile().getName().equals("java")).findFirst();
+        if (!result.isPresent()) {
+            throw new FileNotFoundException("java"
+                    + " not found under " + binDirPath );
+        }
+        LOG.log(Level.INFO, "java executable found in {0}", binDirPath);
+    }
+
+    @Override
+    public String getJavaExecutable() {
+        return "java";
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/MacPKGBundlerUtils.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/MacPKGBundlerUtils.java	Mon Oct 10 20:56:50 2016 +0530
@@ -42,7 +42,7 @@
         try {
             LOG.log(Level.INFO, "Installing {0}.", pkg);
             String[] cmd = new String[] { "sudo", "installer", "-pkg",
-                    pkg.toString(), "-target", "/", "-allowUntrusted" };
+                    pkg.toString(), "-target", "/", "-allowUntrusted","-dumplog","-verbose" };
             Utils.runCommand(cmd, true, CONFIG_INSTANCE.getInstallTimeout());
             LOG.info("Installation done.");
         } catch (ExecutionException e) {
@@ -55,6 +55,7 @@
     public void uninstall(AppWrapper app, String applicationTitle)
             throws IOException {
         try {
+            LOG.log(Level.INFO, "Package Application Identifier is {0}", applicationTitle);
             String subDirName = runCommand(
                     Arrays.asList("pkgutil", "--files", applicationTitle),
                     false, CONFIG_INSTANCE.getRunTimeout()).getOutputStream()
@@ -66,10 +67,13 @@
                             applicationTitle },
                     true, CONFIG_INSTANCE.getRunTimeout());
         } catch (ExecutionException e) {
+            LOG.log(Level.INFO, "IOException occured in MacPKGBundlerUtils.java::uninstall() {0} ",e);
             throw new IOException(e);
         } catch (IndexOutOfBoundsException e) {
             // if installation is failed, then package cannot be removed:
             // just ignore it
+        } catch(Exception e) {
+            LOG.log(Level.INFO, "Exception occured in MacPKGBundlerUtils.java::uninstall() {0} ",e);
         }
     }
 
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/WinAbstractBundlerUtils.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/WinAbstractBundlerUtils.java	Mon Oct 10 20:56:50 2016 +0530
@@ -15,6 +15,7 @@
 import static org.testng.Assert.fail;
 
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
@@ -26,6 +27,7 @@
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
 import java.util.function.Predicate;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -35,6 +37,7 @@
 import com.oracle.appbundlers.utils.AppWrapper;
 import com.oracle.appbundlers.utils.BundlerUtils;
 import com.oracle.appbundlers.utils.Config;
+import com.oracle.appbundlers.utils.ExtensionType;
 import com.oracle.appbundlers.utils.ProcessOutput;
 import com.oracle.appbundlers.utils.Utils;
 import com.oracle.appbundlers.utils.windows.Registry;
@@ -476,8 +479,8 @@
     }
 
     @Override
-    public Path getAppCDSCacheFile(AppWrapper app, String appName) {
-        return Paths.get(System.getenv("APPDATA"), app.getIdentifier(), "cache",
+    public Path getAppCDSCacheFile(AppWrapper app, String appName, ExtensionType extensionType) {
+        return Paths.get(System.getenv("APPDATA"), app.getIdentifier(extensionType), "cache",
                 appName + ".jpa");
     };
 
@@ -494,4 +497,24 @@
         }
         return new String[] { "C:\\cygwin64\\bin\rm.exe", file.toString() };
     };
+
+    public Path getJavaExecutableBinPathInInstalledApp(AppWrapper appWrapper, String appTitle) {
+        return getInstalledAppRootLocation(appWrapper, appTitle).resolve("runtime/bin");
+    }
+
+    @Override
+    public void checkIfExecutablesAvailableInBinDir(Path binDirPath) throws IOException {
+        Optional<Path> result = Files.find(binDirPath, 1, (file, attr) -> file
+                .toFile().getName().equals("java.exe")).findFirst();
+        if (!result.isPresent()) {
+            throw new FileNotFoundException("java"
+                    + " not found under " + binDirPath );
+        }
+        LOG.log(Level.INFO, "java.exe found in {0}", binDirPath);
+    }
+
+    @Override
+    public String getJavaExecutable() {
+        return "java.exe";
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/resources/MacRmApp.java.template	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/resources/MacRmApp.java.template	Mon Oct 10 20:56:50 2016 +0530
@@ -1,10 +1,10 @@
-package testapp;
+package com.rm.testapp;
 
 import java.nio.file.Files;
 import java.io.IOException;
 import com.apple.eawt.Application;
-import com.apple.eawt.AppEvent.OpenFilesEvent;
-import com.apple.eawt.OpenFilesHandler;
+import java.awt.desktop.OpenFilesEvent;
+import java.awt.desktop.OpenFilesHandler;
 import java.io.File;
 import java.util.logging.Level;
 import java.util.logging.Logger;
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/resources/com.rm.module.info.template	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/resources/com.rm.module.info.template	Mon Oct 10 20:56:50 2016 +0530
@@ -1,3 +1,4 @@
 module com.rm {
-
+	requires java.desktop;
+	requires java.logging;
 }
\ No newline at end of file
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSAutoInstallTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSAutoInstallTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -40,14 +40,14 @@
         return new BundlerUtils[] { PKG, DMG, EXE, MSI, DEB, RPM };
     }
 
-    public AdditionalParams getAdditionalParams() throws Exception {
+    public AdditionalParams getAdditionalParams(ExtensionType extension) throws Exception {
         return () -> {
             Map<String, Object> additionalParams = new HashMap<>();
             additionalParams.put(UNLOCK_COMMERCIAL_FEATURES, true);
             additionalParams.put(ENABLE_APP_CDS, true);
             additionalParams.put(APP_CDS_CACHE_MODE, "auto+install");
             additionalParams.put(IDENTIFIER,
-                    this.currentParameter.getApp().getIdentifier());
+                    this.currentParameter.getApp().getIdentifier(extension));
             return additionalParams;
         };
     }
@@ -78,9 +78,9 @@
     }
 
     @Override
-    public void overrideParameters(ExtensionType intermediate)
+    public void overrideParameters(ExtensionType extension)
             throws Exception {
-        this.currentParameter.setAdditionalParams(getAdditionalParams());
+        this.currentParameter.setAdditionalParams(getAdditionalParams(extension));
         this.currentParameter.setVerifiedOptions(getVerifiedOptions());
     }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSCustomClassesTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSCustomClassesTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -34,13 +34,13 @@
 
 public class AppCDSCustomClassesTest extends TestBase {
 
-    protected AdditionalParams getAdditionalParams() {
+    protected AdditionalParams getAdditionalParams(ExtensionType extension) {
         return () -> {
             Map<String, Object> additionalParams = new HashMap<>();
             additionalParams.put(UNLOCK_COMMERCIAL_FEATURES, true);
             additionalParams.put(ENABLE_APP_CDS, true);
             additionalParams.put(IDENTIFIER,
-                    currentParameter.getApp().getIdentifier());
+                    currentParameter.getApp().getIdentifier(extension));
             additionalParams.put(APP_CDS_CLASS_ROOTS, "testapp.util.Util");
             return additionalParams;
         };
@@ -74,9 +74,9 @@
     }
 
     @Override
-    public void overrideParameters(ExtensionType intermediate)
+    public void overrideParameters(ExtensionType extension)
             throws IOException {
-        this.currentParameter.setAdditionalParams(getAdditionalParams());
+        this.currentParameter.setAdditionalParams(getAdditionalParams(extension));
         this.currentParameter.setVerifiedOptions(getVerifiedOptions());
     }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSInstallTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSInstallTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -42,14 +42,14 @@
         return new BundlerUtils[] { PKG, DMG, EXE, MSI, DEB, RPM };
     }
 
-    public AdditionalParams getAdditionalParams() {
+    public AdditionalParams getAdditionalParams(ExtensionType extension) {
         return () -> {
             Map<String, Object> additionalParams = new HashMap<>();
             additionalParams.put(UNLOCK_COMMERCIAL_FEATURES, true);
             additionalParams.put(ENABLE_APP_CDS, true);
             additionalParams.put(APP_CDS_CACHE_MODE, "install");
             additionalParams.put(IDENTIFIER,
-                    this.currentParameter.getApp().getIdentifier());
+                    this.currentParameter.getApp().getIdentifier(extension));
             return additionalParams;
         };
     }
@@ -75,9 +75,9 @@
     }
 
     @Override
-    public void overrideParameters(ExtensionType intermediate)
+    public void overrideParameters(ExtensionType extension)
             throws IOException {
-        this.currentParameter.setAdditionalParams(getAdditionalParams());
+        this.currentParameter.setAdditionalParams(getAdditionalParams(extension));
         this.currentParameter.setVerifiedOptions(getVerifiedOptions());
     }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/AppCDSTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -26,13 +26,13 @@
  */
 public class AppCDSTest extends TestBase {
 
-    public AdditionalParams getAdditionalParams() {
+    public AdditionalParams getAdditionalParams(ExtensionType extensionType) {
         return () -> {
             Map<String, Object> additionalParams = new HashMap<>();
             additionalParams.put(UNLOCK_COMMERCIAL_FEATURES, true);
             additionalParams.put(ENABLE_APP_CDS, true);
             additionalParams.put(IDENTIFIER,
-                    this.currentParameter.getApp().getIdentifier());
+                    this.currentParameter.getApp().getIdentifier(extensionType));
             return additionalParams;
         };
     }
@@ -59,8 +59,8 @@
     }
 
     @Override
-    public void overrideParameters(ExtensionType intermediate) {
-        this.currentParameter.setAdditionalParams(getAdditionalParams());
+    public void overrideParameters(ExtensionType extensionType) {
+        this.currentParameter.setAdditionalParams(getAdditionalParams(extensionType));
         this.currentParameter.setVerifiedOptions(getVerifiedOptions());
     }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/DefaultClassPathTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/DefaultClassPathTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -49,7 +49,7 @@
             throws IOException, ExecutionException {
         app.preinstallApp(extension);
         app.writeSourcesToAppDirectory();
-        app.compileApp();
+        app.compileApp(ExtensionType.NormalJar);
         app.jarApp(Collections.emptyList(), true);
     }
 
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/FileAssociationTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/FileAssociationTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -33,8 +33,7 @@
  */
 
 public class FileAssociationTest extends TestBase {
-    public static final String RM_FULLNAME = "testapp.RmApp";
-    public static final String RM_NAME = "RmApp";
+    public static final String RM_NAME = Utils.isMacOS() ? "MacRmApp" : "RmApp";
     public static final String ext1 = "foo", ext2 = "bar", ext3 = "baz",
             ext4 = "qux";
 
@@ -65,7 +64,7 @@
             association2.put(FA_EXTENSIONS, Arrays.asList(ext3, ext4));
             association2.put(FA_CONTENT_TYPE, Arrays.asList("hello/world"));
             association2.put(FA_ICON, CONFIG_INSTANCE
-                    .getResourceFilePath("icon2." + iconExtension()).toFile());
+                    .getResourceFilePath("icon." + iconExtension()).toFile());
             additionalParams.put(FILE_ASSOCIATIONS,
                     Arrays.asList(association1, association2));
             additionalParams.put(SYSTEM_WIDE, true);
@@ -93,17 +92,21 @@
                 RM_NAME);
         String templateName = Utils.isMacOS() ? "MacRmApp.java.template"
                 : "RmApp.java.template";
-        String mainClassfullyQualifiedName = "com.rm.testapp.RmApp";
+
+        String mainClassfullyQualifiedName = Utils.isMacOS()
+                ? "com.rm.testapp.MacRmApp" : "com.rm.testapp.RmApp";
         switch (extension) {
         default:
             return new AppWrapper(Utils.getTempSubDir(WORK_DIRECTORY),
-                    mainClassfullyQualifiedName, new Source(mainClassfullyQualifiedName, templateName, "rmApp",
-                            replacementsInSrcCodeInternal));
+                    mainClassfullyQualifiedName,
+                    new Source(mainClassfullyQualifiedName, templateName,
+                            "rmApp", replacementsInSrcCodeInternal));
         case ExplodedModules:
         case Jmods:
         case ModularJar:
             Map<String, String> classNameToTemplateMap = new HashMap<String, String>();
-            classNameToTemplateMap.put(mainClassfullyQualifiedName, templateName);
+            classNameToTemplateMap.put(mainClassfullyQualifiedName,
+                    templateName);
             return new AppWrapper(Utils.getTempSubDir(WORK_DIRECTORY),
                     mainClassfullyQualifiedName,
                     new Source("com.rm", "com.rm.module.info.template",
@@ -126,10 +129,24 @@
     @Override
     protected void prepareApp(AppWrapper app, ExtensionType extension)
             throws IOException, ExecutionException {
+
+        String[] javacOptions = null;
         final String makeJavacReadClassesFromRtJar = "-XDignore.symbol.file=true";
+        switch (extension) {
+            case NormalJar: javacOptions = new String[] { makeJavacReadClassesFromRtJar,
+                    DOUBLE_HYPHEN + ADD_EXPORTS
+                    , "java.desktop/com.apple.eawt=ALL-UNNAMED" };
+            break;
+            case ExplodedModules:
+            case Jmods:
+            case ModularJar: javacOptions = new String[] { makeJavacReadClassesFromRtJar,
+                    DOUBLE_HYPHEN + ADD_EXPORTS, "java.desktop/com.apple.eawt=com.rm" };
+                break;
+        }
+
         app.preinstallApp(extension);
         app.writeSourcesToAppDirectory();
-        app.compileApp(new String[] { makeJavacReadClassesFromRtJar });
+        app.compileApp(javacOptions, extension);
         app.jarApp(extension);
     }
 
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/IconTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/IconTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -62,10 +62,4 @@
             throws IOException {
         this.currentParameter.setAdditionalParams(getAdditionalParams());
     }
-
-    @Override
-    public boolean isTestCaseApplicableForExtensionType(
-            ExtensionType extension) {
-        return ExtensionType.NormalJar == extension;
-    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/InstallDirTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/InstallDirTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -17,6 +17,7 @@
 import java.util.Map;
 
 import com.oracle.appbundlers.tests.functionality.functionalinterface.AdditionalParams;
+import com.oracle.appbundlers.tests.functionality.functionalinterface.VerifiedOptions;
 import com.oracle.appbundlers.utils.BundlerUtils;
 import com.oracle.appbundlers.utils.ExtensionType;
 import com.oracle.tools.packager.RelativeFileSet;
@@ -29,14 +30,11 @@
  * Tests {@code installdirChooser} option.
  */
 public class InstallDirTest extends TestBase {
-    private String licenseFileContent = null;
     private Path licenseFileSrc;
-    private Path licenseFile;
+    private String licenseFileContent;
 
     public void initializeVars() throws IOException {
         licenseFileSrc = CONFIG_INSTANCE.getResourceFilePath(LICENSE_FILE_NAME);
-        licenseFile = currentParameter.getApp().getJarDir()
-                .resolve(LICENSE_FILE_NAME);
     }
 
     @Override
@@ -44,31 +42,59 @@
         return new BundlerUtils[] { EXE, MSI };
     }
 
-    public AdditionalParams getAdditionalParams() {
+    public AdditionalParams getAdditionalParams(ExtensionType extension) {
         return () -> {
             Map<String, Object> additionalParams = new HashMap<>();
-            RelativeFileSet appResources = (RelativeFileSet) additionalParams
-                    .get(APP_RESOURCES);
-            appResources.getIncludedFiles().add(LICENSE_FILE_NAME);
+            RelativeFileSet existingRelativeFileSet = (RelativeFileSet) this.currentParameter
+                    .getBasicParams().get(APP_RESOURCES);
+            if (existingRelativeFileSet == null) {
+                RelativeFileSet newRelativeFileSet = this.currentParameter
+                        .getApp().getRelativeFileSetBasedOnExtension(extension);
+                newRelativeFileSet.getIncludedFiles().add(LICENSE_FILE_NAME);
+                additionalParams.put(APP_RESOURCES, newRelativeFileSet);
+            } else {
+                existingRelativeFileSet.getIncludedFiles()
+                        .add(LICENSE_FILE_NAME);
+            }
             additionalParams.put(INSTALLDIR_CHOOSER, "true");
             additionalParams.put(LICENSE_FILE, LICENSE_FILE_NAME);
             return additionalParams;
         };
     }
 
-    @Override
-    protected void prepareTestEnvironment() throws Exception {
-        super.prepareTestEnvironment();
-        initializeVars();
-        Files.deleteIfExists(licenseFile);
-        Files.copy(licenseFileSrc, licenseFile);
-        licenseFileContent = new String(Files.readAllBytes(licenseFile),
-                "UTF-8");
+    protected VerifiedOptions getVerifiedOptions() {
+        return () -> {
+            Map<String, Object> verifiedOptions = new HashMap<>();
+            verifiedOptions.put(LICENSE_FILE, licenseFileContent);
+            return verifiedOptions;
+        };
     }
 
     @Override
-    public void overrideParameters(ExtensionType intermediate)
-            throws IOException {
-        this.currentParameter.setAdditionalParams(getAdditionalParams());
+    protected void prepareTestEnvironment() throws Exception {
+        Path licenseFile = null;
+        for (ExtensionType extension : getExtensionArray()) {
+            if (!isTestCaseApplicableForExtensionType(extension)) {
+                continue;
+            }
+            this.currentParameter = this.intermediateToParametersMap
+                    .get(extension);
+            overrideParameters(extension);
+            initializeAndPrepareApp();
+            licenseFile = this.currentParameter.getApp()
+                    .getJavaExtensionPathBasedonExtension(extension)
+                    .resolve(LICENSE_FILE_NAME);
+            initializeVars();
+            Files.copy(licenseFileSrc, licenseFile);
+            licenseFileContent = new String(Files.readAllBytes(licenseFile),
+                    "UTF-8");
+        }
+    }
+
+    @Override
+    public void overrideParameters(ExtensionType extension) throws IOException {
+        this.currentParameter
+                .setAdditionalParams(getAdditionalParams(extension));
+        this.currentParameter.setVerifiedOptions(getVerifiedOptions());
     }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/LicenseFileTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/LicenseFileTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -21,8 +21,10 @@
 import com.oracle.appbundlers.tests.functionality.functionalinterface.AdditionalParams;
 import com.oracle.appbundlers.tests.functionality.functionalinterface.VerifiedOptions;
 import com.oracle.appbundlers.utils.BundlerUtils;
+import com.oracle.appbundlers.utils.BundlingManager;
 import com.oracle.appbundlers.utils.ExtensionType;
 import com.oracle.tools.packager.RelativeFileSet;
+import com.sun.javafx.tools.packager.bundlers.BundleParams;
 
 /**
  * @author Dmitry Ginzburg &lt;dmitry.x.ginzburg@oracle.com&gt;
@@ -33,29 +35,35 @@
  * Tests {@code licenseFile} option
  */
 public class LicenseFileTest extends TestBase {
-    private String licenseFileContent = null;
+    private String licenseFileContent;
     private Path licenseFileSrc;
-    private Path licenseFile;
 
     public void initializeVars() throws IOException {
         licenseFileSrc = CONFIG_INSTANCE.getResourceFilePath(LICENSE_FILE_NAME);
-        licenseFile = currentParameter.getApp().getJarDir()
-                .resolve(LICENSE_FILE_NAME);
     }
 
     @Override
     protected BundlerUtils[] getBundlerUtils() {
-        return new BundlerUtils[] { DEB,
-                 WIN_APP,
-                EXE, MSI };
+        return new BundlerUtils[] { DEB, WIN_APP, EXE, MSI };
     }
 
-    protected AdditionalParams getAdditionalParams() {
+    protected AdditionalParams getAdditionalParams(ExtensionType extension)
+            throws IOException {
         return () -> {
             Map<String, Object> additionalParams = new HashMap<>();
-            RelativeFileSet appResources = (RelativeFileSet) additionalParams
-                    .get(APP_RESOURCES);
-            appResources.getIncludedFiles().add(LICENSE_FILE_NAME);
+
+            RelativeFileSet existingRelativeFileSet = (RelativeFileSet) this.currentParameter
+                    .getBasicParams().get(APP_RESOURCES);
+            if (existingRelativeFileSet == null) {
+                existingRelativeFileSet = this.currentParameter
+                        .getApp().getRelativeFileSetBasedOnExtension(extension);
+                existingRelativeFileSet.getIncludedFiles().add(LICENSE_FILE_NAME);
+                additionalParams.put(APP_RESOURCES, existingRelativeFileSet);
+            } else {
+                existingRelativeFileSet.getIncludedFiles()
+                        .add(LICENSE_FILE_NAME);
+            }
+            additionalParams.put(BundleParams.PARAM_APP_RESOURCES, existingRelativeFileSet);
             additionalParams.put(LICENSE_FILE, LICENSE_FILE_NAME);
             return additionalParams;
         };
@@ -71,18 +79,35 @@
 
     @Override
     protected void prepareTestEnvironment() throws Exception {
-        super.prepareTestEnvironment();
-        initializeVars();
-        Files.deleteIfExists(licenseFile);
-        Files.copy(licenseFileSrc, licenseFile);
-        licenseFileContent = new String(Files.readAllBytes(licenseFile),
-                "UTF-8");
+        Path licenseFile = null;
+        for (ExtensionType extension : getExtensionArray()) {
+            if (!isTestCaseApplicableForExtensionType(extension)) {
+                continue;
+            }
+            this.currentParameter = this.intermediateToParametersMap
+                    .get(extension);
+            overrideParameters(extension);
+            initializeAndPrepareApp();
+            licenseFile = this.currentParameter.getApp()
+                    .getJavaExtensionPathBasedonExtension(extension)
+                    .resolve(LICENSE_FILE_NAME);
+            initializeVars();
+            Files.copy(licenseFileSrc, licenseFile);
+            licenseFileContent = new String(Files.readAllBytes(licenseFile),
+                    "UTF-8");
+        }
     }
 
     @Override
-    public void overrideParameters(ExtensionType intermediate)
-            throws IOException {
-        this.currentParameter.setAdditionalParams(getAdditionalParams());
+    public void overrideParameters(ExtensionType extension) throws IOException {
+        this.currentParameter
+                .setAdditionalParams(getAdditionalParams(extension));
         this.currentParameter.setVerifiedOptions(getVerifiedOptions());
     }
+
+    @Override
+    protected void executeJavaPackager(BundlingManager bundlingManager,
+            Map<String, Object> allParams) throws IOException {
+        bundlingManager.execute(allParams, this.currentParameter.getApp(), true);
+    }
 }
\ No newline at end of file
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/TestBase.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/TestBase.java	Mon Oct 10 20:56:50 2016 +0530
@@ -58,6 +58,7 @@
 import com.oracle.appbundlers.utils.BundlerUtils;
 import com.oracle.appbundlers.utils.BundlingManager;
 import com.oracle.appbundlers.utils.BundlingManagers;
+import com.oracle.appbundlers.utils.Config;
 import com.oracle.appbundlers.utils.Constants;
 import com.oracle.appbundlers.utils.ExtensionType;
 import com.oracle.appbundlers.utils.JavaExtensionTypeFilter;
@@ -204,6 +205,7 @@
         }
 
         try {
+            LOG.log(Level.INFO,"Parameters before passing to execute method {0}", allParams);
             executeJavaPackager(bundlingManager, allParams);
             String path = bundlingManager.install(
                     this.currentParameter.getApp(), getResultingAppName(),
@@ -247,14 +249,19 @@
 
     @AfterClass
     protected void cleanUp() throws IOException {
-        try {
-            LOG.log(Level.INFO, "Removing temporary files: ");
-        } finally {
-            for (Parameters parameters : intermediateToParametersMap.values()) {
-                if(parameters.getApp() != null && parameters.getApp().getWorkDir() != null) {
-                    Utils.tryRemoveRecursive(parameters.getApp().getWorkDir());
+        if (!Config.CONFIG_INSTANCE.isNoCleanSet()) {
+            try {
+                LOG.log(Level.INFO, "Removing temporary files: ");
+            } finally {
+                for (Parameters parameters : intermediateToParametersMap.values()) {
+                    if(parameters.getApp() != null && parameters.getApp().getWorkDir() != null) {
+                        LOG.log(Level.INFO, "Removing Directory {0} ",parameters.getApp().getWorkDir());
+                        Utils.tryRemoveRecursive(parameters.getApp().getWorkDir());
+                    }
                 }
             }
+        } else {
+            LOG.log(Level.INFO, "SKIPPED cleaning temporary files and bundles directory");
         }
     }
 
@@ -304,10 +311,13 @@
     protected Map<String, Object> getAllParams() throws Exception {
         Map<String, Object> basicParams = this.currentParameter
                 .getBasicParams();
+        LOG.log(Level.INFO, "Basic Parameters are {0}", basicParams);
         Map<String, Object> allParams = new HashMap<String, Object>();
         allParams.put(APP_NAME, getResultingAppName());
         allParams.putAll(basicParams);
-        allParams.putAll(this.currentParameter.getAdditionalParams());
+        Map<String, Object> additionalParams = this.currentParameter.getAdditionalParams();
+        LOG.log(Level.INFO, "Additional Parameters are {0}", additionalParams);
+        allParams.putAll(additionalParams);
         return allParams;
     }
 
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/AddModuleTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/AddModuleTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -24,7 +24,8 @@
         return () -> {
             Map<String, Object> hashMap = new HashMap<String, Object>();
             hashMap.put(ADD_MODS, AddModuleTest.this.getParameters().getApp()
-                    .getAllModuleNamesSeparatedByPathSeparator());
+                    .getAllModuleNamesSeperatedByCommaExceptMainmodule());
+            hashMap.put(STRIP_NATIVE_COMMANDS, false);
             return hashMap;
         };
     }
@@ -45,6 +46,4 @@
             this.currentParameter.setVerifiedOptions(getVerifiedOptions());
         }
     }
-}
-
-
+}
\ No newline at end of file
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/CheckExecutablesAvailableTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/CheckExecutablesAvailableTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -15,7 +15,7 @@
 
 /**
  *  aim of this testcase is to check for executables available
- *  in bin directory when "-stripexecutables false" is passed to
+ *  in bin directory when "-strip-native-commands false" is passed to
  *  javapackager.
  *  @author Ramesh BG
  */
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/LimitModuleTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/LimitModuleTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -40,10 +40,10 @@
     public AppWrapper getApp() throws IOException {
         return new AppWrapper(Utils.getTempSubDir(WORK_DIRECTORY),
                 COM_SHAPE_TEST_LIMITMODSMAINCLASS,
-                SourceFactory.get_com_shape_serviceinterface_module(),
+                SourceFactory.get_com_shape_serviceinterface_module(false),
                 SourceFactory.get_com_shape_serviceprovider_circle_module(),
                 SourceFactory.get_com_shape_serviceprovider_rectangle_module(),
-                SourceFactory.get_com_shape_test_module());
+                SourceFactory.get_com_shape_test_module(true));
     }
 
     public VerifiedOptions getVerifiedOptions() {
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/ListServiceProvidersTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/ListServiceProvidersTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -64,7 +64,8 @@
     private AdditionalParams getAdditionalParams() {
         return () -> {
             Map<String, Object> additionalParams = new HashMap<String, Object>();
-            additionalParams.put(ADD_MODS, this.currentParameter.getApp().getAllModuleNamesSeparatedByComma());
+            additionalParams.put(ADD_MODS, this.currentParameter.getApp()
+                    .getAllModuleNamesSeperatedByCommaExceptMainmodule());
             return additionalParams;
         };
     }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleBundledWithMinimumModulesAnd3rdPartyJarsTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleBundledWithMinimumModulesAnd3rdPartyJarsTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -41,7 +41,7 @@
     public AdditionalParams getAdditionalParams() {
         return () -> {
             Map<String, Object> hashMap = new HashMap<String, Object>();
-            hashMap.put(ADD_MODS, getApp().getAllModuleNamesSeparatedByPathSeparator());
+            hashMap.put(ADD_MODS, getApp().getAllModuleNamesSeparatedByComma());
             return hashMap;
         };
     }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleBundledWithMinimumModulesAnd3rdPartyModulesTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleBundledWithMinimumModulesAnd3rdPartyModulesTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -40,7 +40,7 @@
     public AdditionalParams getAdditionalParams() {
         return () -> {
             Map<String, Object> hashMap = new HashMap<String, Object>();
-            hashMap.put(ADD_MODS, this.currentParameter.getApp().getAllModuleNamesSeparatedByPathSeparator());
+            hashMap.put(ADD_MODS, this.currentParameter.getApp().getAllModuleNamesSeparatedByComma());
             return hashMap;
         };
     }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleWithEntireJreTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleWithEntireJreTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -11,7 +11,6 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import com.oracle.appbundlers.tests.functionality.functionalinterface.AdditionalParams;
 import com.oracle.appbundlers.tests.functionality.functionalinterface.VerifiedOptions;
 import com.oracle.appbundlers.utils.AppWrapper;
 import com.oracle.appbundlers.utils.ExtensionType;
@@ -36,14 +35,6 @@
         };
     }
 
-    protected AdditionalParams getAdditionalParams() {
-        return () -> {
-            Map<String, Object> hashMap = new HashMap<String, Object>();
-            hashMap.put(ADD_MODS, this.currentParameter.getApp().getAllModuleNamesSeparatedByPathSeparator());
-            return hashMap;
-        };
-    }
-
     protected AppWrapper getApp() throws IOException {
         return new AppWrapper(Utils.getTempSubDir(WORK_DIRECTORY),
                 COM_GREETINGS_APP1_QUALIFIED_CLASS_NAME,
@@ -55,7 +46,6 @@
             throws IOException {
         if (ExtensionType.NormalJar != intermediate) {
             this.currentParameter.setApp(getApp());
-            this.currentParameter.setAdditionalParams(getAdditionalParams());
             this.currentParameter.setVerifiedOptions(getVerifiedOptions());
         }
     }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleWithMinimumModulesTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/NamedModuleWithMinimumModulesTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -50,9 +50,9 @@
     }
 
     @Override
-    public void overrideParameters(ExtensionType intermediate)
+    public void overrideParameters(ExtensionType javaExtensionType)
             throws IOException {
-        if (ExtensionType.NormalJar != intermediate) {
+        if (ExtensionType.NormalJar != javaExtensionType) {
             this.currentParameter.setApp(getApp());
             this.currentParameter.setAdditionalParams(getAdditionalParams());
             this.currentParameter.setVerifiedOptions(getVerifiedOptions());
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/UnnamedModuleDependsOn3rdPartyModulesBundledWithEntireJreTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/jdk9test/UnnamedModuleDependsOn3rdPartyModulesBundledWithEntireJreTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -40,7 +40,9 @@
     protected AppWrapper getApp() throws IOException {
         return new AppWrapper(Utils.getTempSubDir(WORK_DIRECTORY),
                 COM_GREETINGS_APP1_QUALIFIED_CLASS_NAME,
-                "-XaddExports:custom.util/testapp.util=ALL-UNNAMED",
+                DOUBLE_HYPHEN + ADD_EXPORTS + SPACE
+                        +
+                "custom.util/testapp.util=ALL-UNNAMED",
                 SourceFactory.get_custom_util_module(),
                 SourceFactory.get_com_greetings_app_unnamed_module(
                         new HashMap<String, String>() {
@@ -67,7 +69,7 @@
         return () -> {
             Map<String, Object> hashMap = new HashMap<String, Object>();
             hashMap.put(ADD_MODS,
-                    this.currentParameter.getApp().getAllModuleNamesSeparatedByPathSeparator());
+                    this.currentParameter.getApp().getAllModuleNamesSeparatedByComma());
             return hashMap;
         };
     }
@@ -109,7 +111,7 @@
     public BasicParams getBasicParams() throws IOException {
         /*
          * there is no main module in this test since unnamed module depending
-         * on named module via -XaddExports
+         * on named module via --add-exports
          */
         return (AppWrapper app) -> {
             Map<String, Object> basicParams = new HashMap<String, Object>();
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/ExplodedModuleParameters.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/ExplodedModuleParameters.java	Mon Oct 10 20:56:50 2016 +0530
@@ -4,7 +4,10 @@
  */
 package com.oracle.appbundlers.tests.functionality.parameters;
 
+import static java.util.stream.Collectors.toSet;
+
 import java.io.File;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -12,6 +15,8 @@
 import com.oracle.appbundlers.tests.functionality.functionalinterface.BasicParams;
 import com.oracle.appbundlers.tests.functionality.functionalinterface.VerifiedOptions;
 import com.oracle.appbundlers.utils.ExtensionType;
+import com.oracle.tools.packager.RelativeFileSet;
+import com.sun.javafx.tools.packager.bundlers.BundleParams;
 
 /**
  * In order to provide default(common) parameters to
@@ -36,6 +41,10 @@
     public Map<String, Object> getBasicParams() throws Exception {
         Map<String, Object> basicParams = new HashMap<String, Object>();
         basicParams.putAll(super.getBasicParams());
+        basicParams.put(BundleParams.PARAM_APP_RESOURCES,
+                new RelativeFileSet(this.app.getExplodedModsDir().toFile(),
+                        app.getExplodedModFileList().stream().map(Path::toFile)
+                                .collect(toSet())));
         basicParams.put(MODULEPATH, String.join(File.pathSeparator,
                 JMODS_PATH_IN_JDK, app.getExplodedModsDir().toString()));
         return requireNonNull(getBasicParamsFunctionalInterface(), basicParams);
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/JmodParameters.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/JmodParameters.java	Mon Oct 10 20:56:50 2016 +0530
@@ -4,7 +4,10 @@
  */
 package com.oracle.appbundlers.tests.functionality.parameters;
 
+import static java.util.stream.Collectors.toSet;
+
 import java.io.File;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -12,6 +15,8 @@
 import com.oracle.appbundlers.tests.functionality.functionalinterface.BasicParams;
 import com.oracle.appbundlers.tests.functionality.functionalinterface.VerifiedOptions;
 import com.oracle.appbundlers.utils.ExtensionType;
+import com.oracle.tools.packager.RelativeFileSet;
+import com.sun.javafx.tools.packager.bundlers.BundleParams;
 
 /**
  * In order to provide default(common) parameters to
@@ -36,6 +41,10 @@
     public Map<String, Object> getBasicParams() throws Exception {
         Map<String, Object> basicParams = new HashMap<String, Object>();
         basicParams.putAll(super.getBasicParams());
+        basicParams.put(BundleParams.PARAM_APP_RESOURCES,
+                new RelativeFileSet(this.app.getJmodsDir().toFile(),
+                        app.getJmodFileList().stream().map(Path::toFile)
+                                .collect(toSet())));
         basicParams.put(MODULEPATH, String.join(File.pathSeparator,
                 JMODS_PATH_IN_JDK, app.getJmodsDir().toString()));
         return requireNonNull(getBasicParamsFunctionalInterface(), basicParams);
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/ModularJarParameters.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/ModularJarParameters.java	Mon Oct 10 20:56:50 2016 +0530
@@ -4,7 +4,10 @@
  */
 package com.oracle.appbundlers.tests.functionality.parameters;
 
+import static java.util.stream.Collectors.toSet;
+
 import java.io.File;
+import java.nio.file.Path;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -12,6 +15,8 @@
 import com.oracle.appbundlers.tests.functionality.functionalinterface.BasicParams;
 import com.oracle.appbundlers.tests.functionality.functionalinterface.VerifiedOptions;
 import com.oracle.appbundlers.utils.ExtensionType;
+import com.oracle.tools.packager.RelativeFileSet;
+import com.sun.javafx.tools.packager.bundlers.BundleParams;
 
 /**
  * In order to provide default(common) parameters to
@@ -35,6 +40,10 @@
     public Map<String, Object> getBasicParams() throws Exception {
         Map<String, Object> basicParams = new HashMap<String, Object>();
         basicParams.putAll(super.getBasicParams());
+        basicParams.put(BundleParams.PARAM_APP_RESOURCES,
+                new RelativeFileSet(this.app.getModularJarsDir().toFile(),
+                        app.getModularJarFileList().stream().map(Path::toFile)
+                                .collect(toSet())));
         basicParams.put(MODULEPATH, String.join(File.pathSeparator,
                 JMODS_PATH_IN_JDK, app.getModularJarsDir().toString()));
         return requireNonNull(getBasicParamsFunctionalInterface(), basicParams);
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/NormalJarParameters.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/parameters/NormalJarParameters.java	Mon Oct 10 20:56:50 2016 +0530
@@ -9,9 +9,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.nio.file.Path;
-import java.util.Arrays;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.stream.Collectors;
 
@@ -59,10 +57,7 @@
                         app.getJarFilesList().stream().map(Path::toFile)
                                 .collect(toSet())));
         basicParams.put(MAIN_JAR,
-                new RelativeFileSet(this.app.getJarDir()
-                        .toFile(),
-                new HashSet<>(
-                        Arrays.asList(this.app.getMainJarFile().toFile()))));
+                this.app.getMainJarFile().toFile().getName());
         basicParams.put(CLASSPATH,
                 this.app.getJarFilesList().stream().map(Path::getFileName)
                         .map(Path::toString)
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeAppInfoParametersTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeAppInfoParametersTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -8,9 +8,12 @@
 import java.io.IOException;
 import java.nio.file.Files;
 
+import org.testng.annotations.Test;
+
 import com.oracle.appbundlers.tests.functionality.AppInfoParametersTest;
 import com.oracle.appbundlers.utils.AppWrapper;
 import com.oracle.appbundlers.utils.BundlerUtils;
+import com.oracle.appbundlers.utils.BundlingManager;
 import com.oracle.appbundlers.utils.BundlingManagers;
 
 /**
@@ -59,4 +62,13 @@
     protected BundlingManagers[] getBundlingManagers() {
         return new BundlingManagers[] {BundlingManagers.CLI};
     }
+
+    /*
+     * SKIPPING UNICODE TEST CASES UNTIL https://bugs.openjdk.java.net/browse/JDK-8089899 is fixed.
+     */
+    @Override
+    @Test(dataProvider = "getBundlers", enabled=false)
+    public void runTest(BundlingManager bundlingManager) throws Exception {
+        super.runTest(bundlingManager);
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeCommandLineArgumentsTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeCommandLineArgumentsTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -10,9 +10,12 @@
 import java.util.HashMap;
 import java.util.List;
 
+import org.testng.annotations.Test;
+
 import com.oracle.appbundlers.tests.functionality.CommandLineArgumentsTest;
 import com.oracle.appbundlers.utils.AppWrapper;
 import com.oracle.appbundlers.utils.BundlerUtils;
+import com.oracle.appbundlers.utils.BundlingManager;
 import com.oracle.appbundlers.utils.BundlingManagers;
 import com.oracle.appbundlers.utils.Source;
 import com.oracle.appbundlers.utils.Utils;
@@ -67,4 +70,13 @@
                                 }
                             }));
     }
+
+    /*
+     * SKIPPING UNICODE TEST CASES UNTIL https://bugs.openjdk.java.net/browse/JDK-8089899 is fixed.
+     */
+    @Override
+    @Test(dataProvider = "getBundlers", enabled=false)
+    public void runTest(BundlingManager bundlingManager) throws Exception {
+        super.runTest(bundlingManager);
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeJvmOptionsTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeJvmOptionsTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -9,12 +9,15 @@
 import java.util.List;
 import java.util.Map;
 
+import org.testng.annotations.Test;
+
 /**
  * @author Dmitry Ginzburg &lt;dmitry.x.ginzburg@oracle.com&gt;
  */
 
 import com.oracle.appbundlers.tests.functionality.JvmOptionsTest;
 import com.oracle.appbundlers.utils.BundlerUtils;
+import com.oracle.appbundlers.utils.BundlingManager;
 import com.oracle.appbundlers.utils.BundlingManagers;
 
 /**
@@ -42,4 +45,13 @@
     protected BundlingManagers[] getBundlingManagers() {
         return new BundlingManagers[] { BundlingManagers.CLI};
     }
+
+    /*
+     * SKIPPING UNICODE TEST CASES UNTIL https://bugs.openjdk.java.net/browse/JDK-8089899 is fixed.
+     */
+    @Override
+    @Test(dataProvider = "getBundlers", enabled=false)
+    public void runTest(BundlingManager bundlingManager) throws Exception {
+        super.runTest(bundlingManager);
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeMainClassTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/unicode/UnicodeMainClassTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -10,8 +10,11 @@
 import java.io.IOException;
 import java.util.HashMap;
 
+import org.testng.annotations.Test;
+
 import com.oracle.appbundlers.tests.functionality.MainClassTest;
 import com.oracle.appbundlers.utils.AppWrapper;
+import com.oracle.appbundlers.utils.BundlingManager;
 import com.oracle.appbundlers.utils.Source;
 import com.oracle.appbundlers.utils.Utils;
 import com.oracle.tools.packager.Bundler;
@@ -64,4 +67,13 @@
         final String id = bundler.getID().toUpperCase();
         return id.equals("DEB") || id.equals("RPM");
     }
+
+    /*
+     * SKIPPING UNICODE TEST CASES UNTIL https://bugs.openjdk.java.net/browse/JDK-8089899 is fixed.
+     */
+    @Override
+    @Test(dataProvider = "getBundlers", enabled=false)
+    public void runTest(BundlingManager bundlingManager) throws Exception {
+        super.runTest(bundlingManager);
+    }
 }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/loading/BundlerLoadingTest.java	Mon Oct 03 10:56:23 2016 +0530
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/loading/BundlerLoadingTest.java	Mon Oct 10 20:56:50 2016 +0530
@@ -86,7 +86,7 @@
                 .map(Bundler::getClass).map(Class::getName).collect(toSet());
         /*
          * since below classes are not exported from jdk.packager module, using
-         * string's directly without use of -XaddExports
+         * string's directly without use of --add-exports
          */
         String[] mustBeLoadedStrings = new String[] {
                 "com.oracle.tools.packager.linux.LinuxRpmBundler",