diff --git a/build.gradle b/build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -2483,7 +2483,28 @@
                 }
             }
         }
-        task buildJavaPackager(dependsOn: [compileJavaPackager, linkJavaPackager])
+        task compilePackagerLibrary(type: CCTask, group: "Build") {
+            description = "Compiles native sources for javapackager.dll"
+            matches = ".*\\.cpp"
+            source(file("src/main/native/javapackager/javapackagerlibrary"));
+            params.addAll(WIN.fxpackagerlibrary.ccFlags)
+            output(file("$buildDir/native/javapackager/javapackagerlibrary/obj"));
+            compiler = WIN.fxpackagerlibrary.compiler
+        }
+        task linkPackagerLibrary(type: LinkTask, group: "Build", dependsOn: compilePackagerLibrary) {
+            description = "Links javapackager.dll"
+            objectDir = file("${buildDir}/native/javapackager/javapackagerlibrary/obj")
+            linkParams.addAll(WIN.fxpackagerlibrary.linkFlags);
+            lib = file("${buildDir}/native/javapackager/javapackagerlibrary/javapackager.dll")
+            linker = WIN.fxpackagerlibrary.linker
+            doLast {
+                copy {
+                    from "${buildDir}/native/javapackager/javapackagerlibrary/packager.dll"
+                    into "${buildDir}/module-lib"
+                }
+            }
+        }
+        task buildJavaPackager(dependsOn: [compileJavaPackager, linkJavaPackager, compilePackagerLibrary, linkPackagerLibrary])
     } else {
         task buildJavaPackager(group: "Build") {
             enabled = COMPILE_FXPACKAGER
diff --git a/buildSrc/win.gradle b/buildSrc/win.gradle
--- a/buildSrc/win.gradle
+++ b/buildSrc/win.gradle
@@ -292,6 +292,17 @@
     "/d", "JFX_INTERNAL_NAME=javapackager",
     rcFlags].flatten();
 
+WIN.fxpackagerlibrary = [:]
+WIN.fxpackagerlibrary.compiler = compiler
+WIN.fxpackagerlibrary.ccFlags = ["/nologo", "/W3",
+        // "/WX",
+        "/EHsc", "/c", "/D_WINDOWS", "/DUNICODE", "/D_UNICODE", "/DWIN32",
+        "/D_LITTLE_ENDIAN", "/DWIN32_LEAN_AND_MEAN", "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32",
+        ccDebugFlags].flatten();
+WIN.fxpackagerlibrary.linker = linker
+WIN.fxpackagerlibrary.linkFlags = ["/nologo", "/WX", "/DLL", "/SUBSYSTEM:WINDOWS", "user32.lib", "shell32.lib", "advapi32.lib", "ole32.lib"]
+if (IS_DEBUG_NATIVE) WIN.launcherlibrary.linkFlags.add("/debug");
+
 WIN.iio = [:]
 WIN.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
 WIN.iio.nativeSource = [
diff --git a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/Platform.java b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/Platform.java
--- a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/Platform.java
+++ b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/Platform.java
@@ -25,6 +25,8 @@
 
 package com.oracle.tools.packager;
 
+import java.util.regex.Pattern;
+
 
 /**
  * Use <code>Platform</code> to detect the operating system that is currently running.
@@ -46,29 +48,57 @@
  */
 
 public enum Platform {UNKNOWN, WINDOWS, LINUX, MAC;
-    private static final Platform FPlatform;
+    private static final Platform platform;
+    private static final int majorVersion;
+    private static final int minorVersion;
 
     static {
         String os = System.getProperty("os.name").toLowerCase();
 
         if (os.indexOf("win") >= 0) {
-            FPlatform = Platform.WINDOWS;
+            platform = Platform.WINDOWS;
         }
         else if (os.indexOf("nix") >= 0 || os.indexOf("nux") >= 0) {
-            FPlatform = Platform.LINUX;
+            platform = Platform.LINUX;
         }
         else if (os.indexOf("mac") >= 0) {
-            FPlatform = Platform.MAC;
+            platform = Platform.MAC;
         }
         else {
-            FPlatform = Platform.UNKNOWN;
+            platform = Platform.UNKNOWN;
+        }
+
+        String version = System.getProperty("os.version").toString();
+        String[] parts = version.split(Pattern.quote("."));
+
+        if (parts.length > 0) {
+            majorVersion = Integer.parseInt(parts[0]);
+
+            if (parts.length > 1) {
+                minorVersion = Integer.parseInt(parts[0]);
+            }
+            else {
+                minorVersion = -1;
+            }
+        }
+        else {
+            majorVersion = -1;
+            minorVersion = -1;
         }
     }
 
     private Platform() {}
 
     public static Platform getPlatform() {
-        return FPlatform;
+        return platform;
+    }
+
+    public static int getMajorVersion() {
+        return majorVersion;
+    }
+
+    public static int getMinorVersion() {
+        return minorVersion;
     }
 }
 
diff --git a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java
--- a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java
+++ b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java
@@ -50,6 +50,7 @@
 
 import static com.oracle.tools.packager.StandardBundlerParam.*;
 import static com.oracle.tools.packager.windows.WindowsBundlerParam.*;
+import java.util.List;
 import jdk.packager.builders.AbstractAppImageBuilder;
 
 public class WinAppBundler extends AbstractImageBundler {
diff --git a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java
--- a/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java
+++ b/modules/jdk.packager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java
@@ -38,6 +38,7 @@
 import static com.oracle.tools.packager.StandardBundlerParam.SERVICE_HINT;
 import static com.oracle.tools.packager.StandardBundlerParam.VERBOSE;
 import static com.oracle.tools.packager.windows.WindowsBundlerParam.*;
+import jdk.packager.internal.windows.WindowsDefender;
 
 public class WinExeBundler extends AbstractBundler {
 
@@ -333,10 +334,15 @@
         if (!outputDirectory.isDirectory() && !outputDirectory.mkdirs()) {
             throw new RuntimeException(MessageFormat.format(I18N.getString("error.cannot-create-output-dir"), outputDirectory.getAbsolutePath()));
         }
+
         if (!outputDirectory.canWrite()) {
             throw new RuntimeException(MessageFormat.format(I18N.getString("error.cannot-write-to-output-dir"), outputDirectory.getAbsolutePath()));
         }
 
+        if (WindowsDefender.isThereAPotentialWindowsDefenderIssue()) {
+            Log.info(MessageFormat.format(I18N.getString("message.potential.windows.defender.issue"), WindowsDefender.getUserTempDirectory()));
+        }
+
         // validate we have valid tools before continuing
         String iscc = TOOL_INNO_SETUP_COMPILER_EXECUTABLE.fetchFrom(p);
         if (iscc == null || !new File(iscc).isFile()) {
@@ -685,7 +691,6 @@
 
     private File buildEXE(Map<String, ? super Object> params, File outdir) throws IOException {
         Log.verbose(MessageFormat.format(I18N.getString("message.outputting-to-location"), outdir.getAbsolutePath()));
-
         outdir.mkdirs();
 
         //run candle
diff --git a/modules/jdk.packager/src/main/java/jdk/packager/builders/windows/WindowsAppImageBuilder.java b/modules/jdk.packager/src/main/java/jdk/packager/builders/windows/WindowsAppImageBuilder.java
--- a/modules/jdk.packager/src/main/java/jdk/packager/builders/windows/WindowsAppImageBuilder.java
+++ b/modules/jdk.packager/src/main/java/jdk/packager/builders/windows/WindowsAppImageBuilder.java
@@ -33,6 +33,7 @@
 import com.oracle.tools.packager.windows.WinResources;
 import com.oracle.tools.packager.windows.WindowsBundlerParam;
 import jdk.packager.builders.AbstractAppImageBuilder;
+import jdk.packager.internal.windows.WindowsRegistry;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -59,6 +60,8 @@
 import java.util.stream.Stream;
 
 import static com.oracle.tools.packager.StandardBundlerParam.*;
+import jdk.packager.internal.windows.WindowsDefender;
+import jdk.packager.internal.windows.WindowsNativeResourceManager;
 
 /**
  *
@@ -359,7 +362,6 @@
     }
 
     private void createLauncherForEntryPoint(Map<String, ? super Object> p) throws IOException {
-
         File launcherIcon = ICON_ICO.fetchFrom(p);
         File icon = launcherIcon != null ? launcherIcon : ICON_ICO.fetchFrom(params);
         File iconTarget = getConfig_AppIcon(p);
@@ -388,9 +390,13 @@
 
             // Run tool on launcher file to change the icon and the metadata.
             try {
+                if (WindowsDefender.isThereAPotentialWindowsDefenderIssue()) {
+                    Log.info(MessageFormat.format(I18N.getString("message.potential.windows.defender.issue"), WindowsDefender.getUserTempDirectory()));
+                }
+
                 launcher.setWritable(true);
 
-                if (iconTarget.exists()) {
+                /*if (iconTarget.exists()) {
                     ProcessBuilder pb = new ProcessBuilder(
                             tool.getAbsolutePath(),
                             "--icon-swap",
@@ -408,7 +414,12 @@
                             executableProperties.getAbsolutePath(),
                             launcher.getAbsolutePath());
                     IOUtils.exec(pb, VERBOSE.fetchFrom(p));
-                }
+                }*/
+                WindowsNativeResourceManager.changeIcon(iconTarget.getAbsolutePath(),
+                            launcher.getAbsolutePath());
+                File executableProperties = getConfig_ExecutableProperties(p); // ToDo: remove the properties file and send the stuff straight through.
+                WindowsNativeResourceManager.changeVersionInfo(executableProperties.getAbsolutePath(),
+                            launcher.getAbsolutePath());
             }
             finally {
                 executableFile.toFile().setReadOnly();
diff --git a/modules/jdk.packager/src/main/java/jdk/packager/internal/windows/WindowsDefender.java b/modules/jdk.packager/src/main/java/jdk/packager/internal/windows/WindowsDefender.java
new file mode 100644
--- /dev/null
+++ b/modules/jdk.packager/src/main/java/jdk/packager/internal/windows/WindowsDefender.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.packager.internal.windows;
+
+import com.oracle.tools.packager.Platform;
+import java.util.List;
+
+public final class WindowsDefender {
+
+    private WindowsDefender() {}
+
+    public static final boolean isThereAPotentialWindowsDefenderIssue() {
+        boolean result = false;
+
+        if (Platform.getPlatform() == Platform.WINDOWS &&
+            Platform.getMajorVersion() == 10) {
+
+            // If DisableRealtimeMonitoring is not enabled then there
+            // may be a problem.
+            if (!WindowsRegistry.readDisableRealtimeMonitoring() &&
+                !isTempDirectoryInExclusionPath()) {
+                result = true;
+            }
+        }
+
+        return result;
+    }
+
+    private static final boolean isTempDirectoryInExclusionPath() {
+        boolean result = false;
+        // If the user temp directory is not found in the exclusion
+        // list then there may be a problem.
+        List<String> paths = WindowsRegistry.readExclusionsPaths();
+        String tempDirectory = getUserTempDirectory();
+
+        for (String s : paths) {
+            if (s.equals(tempDirectory)) {
+                result = true;
+                break;
+            }
+        }
+
+        return result;
+    }
+
+    public static final String getUserTempDirectory() {
+        String tempDirectory = System.getProperty("user.home").toString() + "\\AppData\\Local\\Temp";
+        return tempDirectory;
+    }
+}
diff --git a/modules/jdk.packager/src/main/java/jdk/packager/internal/windows/WindowsRegistry.java b/modules/jdk.packager/src/main/java/jdk/packager/internal/windows/WindowsRegistry.java
new file mode 100644
--- /dev/null
+++ b/modules/jdk.packager/src/main/java/jdk/packager/internal/windows/WindowsRegistry.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.packager.internal.windows;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.oracle.tools.packager.IOUtils.exec;
+
+public final class WindowsRegistry {
+
+    private WindowsRegistry() {}
+
+    /**
+     * Reads the registry value for DisableRealtimeMonitoring.
+     * @return true if DisableRealtimeMonitoring is set to 0x1, false otherwise.
+     */
+    public static final boolean readDisableRealtimeMonitoring() {
+        boolean result = false;
+        final String key = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows Defender\\Real-Time Protection";
+        final String subkey = "DisableRealtimeMonitoring";
+        String value = readRegistry(key, subkey);
+
+        if (!value.isEmpty()) {
+            // This code could be written better but this works. It validates
+            // that the result of readRegistry returned what we expect and then
+            // checks for a 0x0 or 0x1. 0x0 means real time monitoring is
+            // on, 0x1 means it is off. So this function returns true if
+            // real-time-monitoring is disabled.
+            int index = value.indexOf(subkey);
+            value = value.substring(index + subkey.length());
+            String reg = "REG_DWORD";
+            index = value.indexOf(reg);
+            value = value.substring(index + reg.length());
+            String hex = "0x";
+            index = value.indexOf(hex);
+            value = value.substring(index + hex.length());
+
+            if (value.equals("1")) {
+                result = true;
+            }
+        }
+
+        return result;
+    }
+
+    public static final List<String> readExclusionsPaths() {
+        List<String> result = new ArrayList();
+        final String key = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows Defender\\Exclusions\\Paths";
+        String value = readRegistry(key, "");
+
+        if (!value.isEmpty()) {
+            final String reg = "REG_DWORD";
+            final String hex = "0x0";
+
+            int index = value.indexOf(key);
+            if (index == 0) {
+                value = value.substring(index + key.length());
+
+                while (value.length() > 0) {
+                    index = value.indexOf(reg);
+                    String name = value.substring(0, index);
+                    value = value.substring(index + reg.length());
+                    index = value.indexOf(hex);
+                    value = value.substring(index + hex.length());
+
+                    if (index > 0) {
+                        name = name.trim();
+                        result.add(name);
+                    }
+                }
+            }
+        }
+
+        return result;
+    }
+    /**
+     * @param key in the registry
+     * @param subkey in the registry key
+     * @return registry value or null if not found
+     */
+    public static final String readRegistry(String key, String subkey){
+        String result = "";
+
+        try {
+            List<String> buildOptions = new ArrayList<>();
+            //buildOptions.add("cmd.exe");
+            //buildOptions.add("/c");
+            buildOptions.add("reg");
+            buildOptions.add("query");
+            buildOptions.add("\"" + key + "\"");
+
+            if (!subkey.isEmpty()) {
+                buildOptions.add("/v");
+                buildOptions.add(subkey);
+            }
+
+            try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos)) {
+                ProcessBuilder security = new ProcessBuilder(buildOptions);
+                exec(security, false, false, ps);
+                BufferedReader bfReader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(baos.toByteArray())));
+                String line = null;
+
+                while((line = bfReader.readLine()) != null){
+                    result += line;
+                }
+            }
+            catch (IOException e) {
+            }
+        }
+        catch (Exception e) {
+        }
+
+        return result;
+    }
+}
diff --git a/modules/jdk.packager/src/main/resources/com/oracle/tools/packager/windows/WinExeBundler.properties b/modules/jdk.packager/src/main/resources/com/oracle/tools/packager/windows/WinExeBundler.properties
--- a/modules/jdk.packager/src/main/resources/com/oracle/tools/packager/windows/WinExeBundler.properties
+++ b/modules/jdk.packager/src/main/resources/com/oracle/tools/packager/windows/WinExeBundler.properties
@@ -51,3 +51,4 @@
 message.running-wsh-script=Running WSH script on application image [{0}]
 message.iscc-file-string=\  InnoSetup compiler set to {0}
 message.creating-association-with-null-extension=Creating association with null extension.
+message.potential.windows.defender.issue=Warning: Windows Defender may prevent the Java Packager from functioning. If there is an issue, it can be addressed by either disabling realtime monitoring, or adding an exclusion for the directory "{0}".
\ No newline at end of file
diff --git a/modules/jdk.packager/src/main/resources/jdk/packager/builders/windows/WindowsAppImageBuilder.properties b/modules/jdk.packager/src/main/resources/jdk/packager/builders/windows/WindowsAppImageBuilder.properties
--- a/modules/jdk.packager/src/main/resources/jdk/packager/builders/windows/WindowsAppImageBuilder.properties
+++ b/modules/jdk.packager/src/main/resources/jdk/packager/builders/windows/WindowsAppImageBuilder.properties
@@ -11,5 +11,6 @@
 error.cannot-write-to-output-dir=Output directory {0} is not writable.
 
 message.config-save-location=Config files are saved to {0}. Use them to customize package.
+message.potential.windows.defender.issue=Warning: Windows Defender may prevent the Java Packager from functioning. If there is an issue, it can be addressed by either disabling realtime monitoring, or adding an exclusion for the directory "{0}".
 
-resource.executable-properties-template=Template for creating executable properties file.
+resource.executable-properties-template=Template for creating executable properties file.
\ No newline at end of file
