You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2022/12/08 13:14:30 UTC

[netbeans-native-installers] branch master updated (f77603a -> 40d5d12)

This is an automated email from the ASF dual-hosted git repository.

skygo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git


    from f77603a  initial code for installers
     new 820863d  [INFRA-15006] Initial donation of NetBeans.
     new bca92aa  [NETBEANS-54] First batch of license header changes to Apache
     new 2238d77  [NETBEANS-161] Changed license header introducer to simple slash-star
     new 39a33e6  [NETBEANS-309] Add licenseinfo.xml for image data clarifying license status
     new c9f2e2d  [NETBEANS-1157] resolved problem with java version higher 9 and the native windows launcher
     new f338cc4  clean up code and implementation of hints
     new f60b1b6  [NETBEANS-1671] Donation 3 - Include installer sources (#1052)
     new e89fd9f  [NETBEANS-2381] JDK 12 ver string support in nbi native win launcher (#1196)
     new 5d45551  Cleaner: Fixed spelling error in constant: MAX_ATTEPTS --> MAX_ATTEMPTS
     new 215bdda  Cleaner: Removed commented-out code and added explanatory comments.
     new 0b5c152  [NETBEANS-3094] NBI cleaner process must attempt to delete read-only files too.
     new d60ca4f  [NETBEANS-2523] Installer creates invalid Win Registry value
     new c19236b  Adding the fix that was applied to generate the Mac OS installer for Apache NetBeans 12.1
     new 8188a14   Open clean up code base to remove Windows 95 & 98 support..
     new e10fbb5  Revert PR4025 "Open clean up code base to remove Windows 95 & 98 support.." due to compile time constant changes.
     new a204ab9  initial commit
     new 33fa472  Initial commit
     new 40d5d12  Merge pull request #2 from ebarboni/initcommit

The 19 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/cpp/build.properties                      |   68 +
 src/main/cpp/build.xml                             |  146 ++
 src/main/cpp/cleaner/unix/src/cleaner.sh           |   92 ++
 src/main/cpp/cleaner/windows/Makefile              |   79 +
 src/main/cpp/cleaner/windows/Makefile-vc           |   59 +
 .../cleaner/windows/nbproject/configurations.xml   |   97 ++
 .../cleaner/windows/nbproject/project.properties   |   20 +
 src/main/cpp/cleaner/windows/nbproject/project.xml |   31 +
 src/main/cpp/cleaner/windows/src/main.c            |  482 ++++++
 .../windows/vcproject/NBI Native Cleaner.ncb       |    1 +
 .../windows/vcproject/NBI Native Cleaner.sln       |   20 +
 .../windows/vcproject/NBI Native Cleaner.suo       |  Bin 0 -> 33280 bytes
 .../windows/vcproject/NBI Native Cleaner.vcproj    |  209 +++
 .../vcproject/NBI Native Cleaner.vcproj.user       |    1 +
 src/main/cpp/jnilib/.common/src/CommonUtils.c      |  384 +++++
 src/main/cpp/jnilib/.common/src/CommonUtils.h      |  122 ++
 .../cpp/jnilib/.unix/src/jni_UnixNativeUtils.c     |  108 ++
 .../cpp/jnilib/.unix/src/jni_UnixNativeUtils.h     |   83 +
 src/main/cpp/jnilib/linux/Makefile                 |  109 ++
 .../cpp/jnilib/linux/nbproject/configurations.xml  |  183 +++
 .../cpp/jnilib/linux/nbproject/project.properties  |   20 +
 src/main/cpp/jnilib/linux/nbproject/project.xml    |   31 +
 src/main/cpp/jnilib/macosx/Makefile                |  109 ++
 .../cpp/jnilib/macosx/nbproject/configurations.xml |  125 ++
 .../cpp/jnilib/macosx/nbproject/project.properties |   20 +
 src/main/cpp/jnilib/macosx/nbproject/project.xml   |   31 +
 src/main/cpp/jnilib/solaris-sparc/Makefile         |  109 ++
 .../solaris-sparc/nbproject/configurations.xml     |  283 ++++
 .../solaris-sparc/nbproject/project.properties     |   20 +
 .../cpp/jnilib/solaris-sparc/nbproject/project.xml |   31 +
 src/main/cpp/jnilib/solaris-x86/Makefile           |  109 ++
 .../solaris-x86/nbproject/configurations.xml       |  283 ++++
 .../solaris-x86/nbproject/project.properties       |   20 +
 .../cpp/jnilib/solaris-x86/nbproject/project.xml   |   31 +
 src/main/cpp/jnilib/windows/Makefile               |  109 ++
 src/main/cpp/jnilib/windows/Makefile-vc            |   76 +
 src/main/cpp/jnilib/windows/Makefile-vc-wo-crt     |   79 +
 .../jnilib/windows/nbproject/configurations.xml    |  179 +++
 .../jnilib/windows/nbproject/project.properties    |   20 +
 src/main/cpp/jnilib/windows/nbproject/project.xml  |   31 +
 src/main/cpp/jnilib/windows/src/WindowsUtils.c     |  146 ++
 src/main/cpp/jnilib/windows/src/WindowsUtils.h     |   48 +
 .../jnilib/windows/src/jni_WindowsNativeUtils.c    |  400 +++++
 .../jnilib/windows/src/jni_WindowsNativeUtils.h    |  109 ++
 .../cpp/jnilib/windows/src/jni_WindowsRegistry.c   |  632 ++++++++
 .../cpp/jnilib/windows/src/jni_WindowsRegistry.h   |  266 ++++
 .../jnilib/windows/vcproject/NBI JNI Library.ncb   |    1 +
 .../jnilib/windows/vcproject/NBI JNI Library.sln   |   20 +
 .../jnilib/windows/vcproject/NBI JNI Library.suo   |  Bin 0 -> 13824 bytes
 .../windows/vcproject/NBI JNI Library.vcproj       |  261 +++
 .../windows/vcproject/NBI JNI Library.vcproj.user  |    1 +
 src/main/cpp/jnilib/windows/vcproject/vc80.idb     |  Bin 0 -> 11264 bytes
 .../cpp/launcher/unix/i18n/launcher.properties     |   51 +
 src/main/cpp/launcher/unix/src/launcher.sh         | 1665 ++++++++++++++++++++
 src/main/cpp/launcher/windows/.dep.inc             |    5 +
 src/main/cpp/launcher/windows/Makefile             |  109 ++
 src/main/cpp/launcher/windows/Makefile-vc          |   92 ++
 src/main/cpp/launcher/windows/Makefile-vc-wo-crt   |   92 ++
 .../cpp/launcher/windows/i18n/launcher.properties  |   54 +
 .../launcher/windows/nbproject/configurations.xml  |  107 ++
 .../launcher/windows/nbproject/project.properties  |   20 +
 .../cpp/launcher/windows/nbproject/project.xml     |   46 +
 src/main/cpp/launcher/windows/resources/icon.ico   |  Bin 0 -> 99678 bytes
 .../windows/resources/nlw-alt.exe.manifest         |   31 +
 .../launcher/windows/resources/nlw.exe.manifest    |   31 +
 src/main/cpp/launcher/windows/resources/res.rc     |   39 +
 src/main/cpp/launcher/windows/src/Errors.h         |   52 +
 src/main/cpp/launcher/windows/src/ExtractUtils.c   |  761 +++++++++
 src/main/cpp/launcher/windows/src/ExtractUtils.h   |   50 +
 src/main/cpp/launcher/windows/src/FileUtils.c      |  593 +++++++
 src/main/cpp/launcher/windows/src/FileUtils.h      |   68 +
 src/main/cpp/launcher/windows/src/JavaUtils.c      |  796 ++++++++++
 src/main/cpp/launcher/windows/src/JavaUtils.h      |   64 +
 src/main/cpp/launcher/windows/src/Launcher.c       | 1009 ++++++++++++
 src/main/cpp/launcher/windows/src/Launcher.h       |   53 +
 src/main/cpp/launcher/windows/src/Main.c           |  672 ++++++++
 src/main/cpp/launcher/windows/src/Main.h           |   58 +
 src/main/cpp/launcher/windows/src/ProcessUtils.c   |  221 +++
 src/main/cpp/launcher/windows/src/ProcessUtils.h   |   48 +
 src/main/cpp/launcher/windows/src/RegistryUtils.c  |   60 +
 src/main/cpp/launcher/windows/src/RegistryUtils.h  |   44 +
 src/main/cpp/launcher/windows/src/StringUtils.c    |  794 ++++++++++
 src/main/cpp/launcher/windows/src/StringUtils.h    |  149 ++
 src/main/cpp/launcher/windows/src/SystemUtils.c    |  100 ++
 src/main/cpp/launcher/windows/src/SystemUtils.h    |   44 +
 src/main/cpp/launcher/windows/src/Types.h          |  155 ++
 .../windows/vcproject/NBI Native Launcher.ncb      |    1 +
 .../windows/vcproject/NBI Native Launcher.sln      |   17 +
 .../windows/vcproject/NBI Native Launcher.suo      |  Bin 0 -> 50176 bytes
 .../windows/vcproject/NBI Native Launcher.vcproj   |  304 ++++
 .../NBI Native Launcher.vcproj.SARD.dlm198383.user |   65 +
 .../vcproject/NBI Native Launcher.vcproj.user      |    1 +
 92 files changed, 14415 insertions(+)
 create mode 100644 src/main/cpp/build.properties
 create mode 100644 src/main/cpp/build.xml
 create mode 100644 src/main/cpp/cleaner/unix/src/cleaner.sh
 create mode 100644 src/main/cpp/cleaner/windows/Makefile
 create mode 100644 src/main/cpp/cleaner/windows/Makefile-vc
 create mode 100644 src/main/cpp/cleaner/windows/nbproject/configurations.xml
 create mode 100644 src/main/cpp/cleaner/windows/nbproject/project.properties
 create mode 100644 src/main/cpp/cleaner/windows/nbproject/project.xml
 create mode 100644 src/main/cpp/cleaner/windows/src/main.c
 create mode 100644 src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.ncb
 create mode 100644 src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.sln
 create mode 100644 src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.suo
 create mode 100644 src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.vcproj
 create mode 100644 src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user
 create mode 100644 src/main/cpp/jnilib/.common/src/CommonUtils.c
 create mode 100644 src/main/cpp/jnilib/.common/src/CommonUtils.h
 create mode 100644 src/main/cpp/jnilib/.unix/src/jni_UnixNativeUtils.c
 create mode 100644 src/main/cpp/jnilib/.unix/src/jni_UnixNativeUtils.h
 create mode 100644 src/main/cpp/jnilib/linux/Makefile
 create mode 100644 src/main/cpp/jnilib/linux/nbproject/configurations.xml
 create mode 100644 src/main/cpp/jnilib/linux/nbproject/project.properties
 create mode 100644 src/main/cpp/jnilib/linux/nbproject/project.xml
 create mode 100644 src/main/cpp/jnilib/macosx/Makefile
 create mode 100644 src/main/cpp/jnilib/macosx/nbproject/configurations.xml
 create mode 100644 src/main/cpp/jnilib/macosx/nbproject/project.properties
 create mode 100644 src/main/cpp/jnilib/macosx/nbproject/project.xml
 create mode 100644 src/main/cpp/jnilib/solaris-sparc/Makefile
 create mode 100644 src/main/cpp/jnilib/solaris-sparc/nbproject/configurations.xml
 create mode 100644 src/main/cpp/jnilib/solaris-sparc/nbproject/project.properties
 create mode 100644 src/main/cpp/jnilib/solaris-sparc/nbproject/project.xml
 create mode 100644 src/main/cpp/jnilib/solaris-x86/Makefile
 create mode 100644 src/main/cpp/jnilib/solaris-x86/nbproject/configurations.xml
 create mode 100644 src/main/cpp/jnilib/solaris-x86/nbproject/project.properties
 create mode 100644 src/main/cpp/jnilib/solaris-x86/nbproject/project.xml
 create mode 100644 src/main/cpp/jnilib/windows/Makefile
 create mode 100644 src/main/cpp/jnilib/windows/Makefile-vc
 create mode 100644 src/main/cpp/jnilib/windows/Makefile-vc-wo-crt
 create mode 100644 src/main/cpp/jnilib/windows/nbproject/configurations.xml
 create mode 100644 src/main/cpp/jnilib/windows/nbproject/project.properties
 create mode 100644 src/main/cpp/jnilib/windows/nbproject/project.xml
 create mode 100644 src/main/cpp/jnilib/windows/src/WindowsUtils.c
 create mode 100644 src/main/cpp/jnilib/windows/src/WindowsUtils.h
 create mode 100644 src/main/cpp/jnilib/windows/src/jni_WindowsNativeUtils.c
 create mode 100644 src/main/cpp/jnilib/windows/src/jni_WindowsNativeUtils.h
 create mode 100644 src/main/cpp/jnilib/windows/src/jni_WindowsRegistry.c
 create mode 100644 src/main/cpp/jnilib/windows/src/jni_WindowsRegistry.h
 create mode 100644 src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.ncb
 create mode 100644 src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.sln
 create mode 100644 src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.suo
 create mode 100644 src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.vcproj
 create mode 100644 src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.vcproj.user
 create mode 100644 src/main/cpp/jnilib/windows/vcproject/vc80.idb
 create mode 100644 src/main/cpp/launcher/unix/i18n/launcher.properties
 create mode 100644 src/main/cpp/launcher/unix/src/launcher.sh
 create mode 100644 src/main/cpp/launcher/windows/.dep.inc
 create mode 100644 src/main/cpp/launcher/windows/Makefile
 create mode 100644 src/main/cpp/launcher/windows/Makefile-vc
 create mode 100644 src/main/cpp/launcher/windows/Makefile-vc-wo-crt
 create mode 100644 src/main/cpp/launcher/windows/i18n/launcher.properties
 create mode 100644 src/main/cpp/launcher/windows/nbproject/configurations.xml
 create mode 100644 src/main/cpp/launcher/windows/nbproject/project.properties
 create mode 100644 src/main/cpp/launcher/windows/nbproject/project.xml
 create mode 100644 src/main/cpp/launcher/windows/resources/icon.ico
 create mode 100644 src/main/cpp/launcher/windows/resources/nlw-alt.exe.manifest
 create mode 100644 src/main/cpp/launcher/windows/resources/nlw.exe.manifest
 create mode 100644 src/main/cpp/launcher/windows/resources/res.rc
 create mode 100644 src/main/cpp/launcher/windows/src/Errors.h
 create mode 100644 src/main/cpp/launcher/windows/src/ExtractUtils.c
 create mode 100644 src/main/cpp/launcher/windows/src/ExtractUtils.h
 create mode 100644 src/main/cpp/launcher/windows/src/FileUtils.c
 create mode 100644 src/main/cpp/launcher/windows/src/FileUtils.h
 create mode 100644 src/main/cpp/launcher/windows/src/JavaUtils.c
 create mode 100644 src/main/cpp/launcher/windows/src/JavaUtils.h
 create mode 100644 src/main/cpp/launcher/windows/src/Launcher.c
 create mode 100644 src/main/cpp/launcher/windows/src/Launcher.h
 create mode 100644 src/main/cpp/launcher/windows/src/Main.c
 create mode 100644 src/main/cpp/launcher/windows/src/Main.h
 create mode 100644 src/main/cpp/launcher/windows/src/ProcessUtils.c
 create mode 100644 src/main/cpp/launcher/windows/src/ProcessUtils.h
 create mode 100644 src/main/cpp/launcher/windows/src/RegistryUtils.c
 create mode 100644 src/main/cpp/launcher/windows/src/RegistryUtils.h
 create mode 100644 src/main/cpp/launcher/windows/src/StringUtils.c
 create mode 100644 src/main/cpp/launcher/windows/src/StringUtils.h
 create mode 100644 src/main/cpp/launcher/windows/src/SystemUtils.c
 create mode 100644 src/main/cpp/launcher/windows/src/SystemUtils.h
 create mode 100644 src/main/cpp/launcher/windows/src/Types.h
 create mode 100644 src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.ncb
 create mode 100644 src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.sln
 create mode 100644 src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.suo
 create mode 100644 src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj
 create mode 100644 src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj.SARD.dlm198383.user
 create mode 100644 src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj.user


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 01/19: [INFRA-15006] Initial donation of NetBeans.

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 820863d01f5d27a4d5b42ae2c235d508c80645a8
Author: pgebauer <pe...@oracle.com>
AuthorDate: Mon Sep 11 15:32:02 2017 +0200

    [INFRA-15006] Initial donation of NetBeans.
    
    Equivalent to the content of netbeans-donation-review.zip donated as part of ApacheNetBeansDonation1.zip with SHA256 being 7f2ca0f61953a190613c9a0fbcc1b034084b04a4d55d23c02cefffc354e7c24a.
---
 build.properties                                   |   88 +
 build.xml                                          |  164 ++
 cleaner/unix/src/cleaner.sh                        |  112 ++
 cleaner/windows/Makefile                           |   99 ++
 cleaner/windows/Makefile-vc                        |   59 +
 cleaner/windows/nbproject/configurations.xml       |  115 ++
 cleaner/windows/nbproject/project.properties       |   40 +
 cleaner/windows/nbproject/project.xml              |   49 +
 cleaner/windows/src/main.c                         |  493 ++++++
 cleaner/windows/vcproject/NBI Native Cleaner.ncb   |    1 +
 cleaner/windows/vcproject/NBI Native Cleaner.sln   |   20 +
 cleaner/windows/vcproject/NBI Native Cleaner.suo   |  Bin 0 -> 33280 bytes
 .../windows/vcproject/NBI Native Cleaner.vcproj    |  209 +++
 .../vcproject/NBI Native Cleaner.vcproj.user       |    1 +
 jnilib/.common/src/CommonUtils.c                   |  404 +++++
 jnilib/.common/src/CommonUtils.h                   |  142 ++
 jnilib/.unix/src/jni_UnixNativeUtils.c             |  128 ++
 jnilib/.unix/src/jni_UnixNativeUtils.h             |  103 ++
 jnilib/linux/Makefile                              |  129 ++
 jnilib/linux/nbproject/configurations.xml          |  201 +++
 jnilib/linux/nbproject/project.properties          |   40 +
 jnilib/linux/nbproject/project.xml                 |   49 +
 jnilib/macosx/Makefile                             |  129 ++
 jnilib/macosx/nbproject/configurations.xml         |  144 ++
 jnilib/macosx/nbproject/project.properties         |   40 +
 jnilib/macosx/nbproject/project.xml                |   49 +
 jnilib/solaris-sparc/Makefile                      |  129 ++
 jnilib/solaris-sparc/nbproject/configurations.xml  |  301 ++++
 jnilib/solaris-sparc/nbproject/project.properties  |   40 +
 jnilib/solaris-sparc/nbproject/project.xml         |   49 +
 jnilib/solaris-x86/Makefile                        |  129 ++
 jnilib/solaris-x86/nbproject/configurations.xml    |  301 ++++
 jnilib/solaris-x86/nbproject/project.properties    |   40 +
 jnilib/solaris-x86/nbproject/project.xml           |   49 +
 jnilib/windows/Makefile                            |  129 ++
 jnilib/windows/Makefile-vc                         |   76 +
 jnilib/windows/Makefile-vc-wo-crt                  |   79 +
 jnilib/windows/nbproject/configurations.xml        |  197 +++
 jnilib/windows/nbproject/project.properties        |   40 +
 jnilib/windows/nbproject/project.xml               |   49 +
 jnilib/windows/src/WindowsUtils.c                  |  166 ++
 jnilib/windows/src/WindowsUtils.h                  |   68 +
 jnilib/windows/src/jni_WindowsNativeUtils.c        |  420 +++++
 jnilib/windows/src/jni_WindowsNativeUtils.h        |  129 ++
 jnilib/windows/src/jni_WindowsRegistry.c           |  652 ++++++++
 jnilib/windows/src/jni_WindowsRegistry.h           |  286 ++++
 jnilib/windows/vcproject/NBI JNI Library.ncb       |    1 +
 jnilib/windows/vcproject/NBI JNI Library.sln       |   20 +
 jnilib/windows/vcproject/NBI JNI Library.suo       |  Bin 0 -> 13824 bytes
 jnilib/windows/vcproject/NBI JNI Library.vcproj    |  261 +++
 .../windows/vcproject/NBI JNI Library.vcproj.user  |    1 +
 jnilib/windows/vcproject/vc80.idb                  |  Bin 0 -> 11264 bytes
 launcher/unix/i18n/launcher.properties             |   71 +
 launcher/unix/src/launcher.sh                      | 1685 ++++++++++++++++++++
 launcher/windows/.dep.inc                          |    5 +
 launcher/windows/Makefile                          |  129 ++
 launcher/windows/Makefile-vc                       |   92 ++
 launcher/windows/Makefile-vc-wo-crt                |   92 ++
 launcher/windows/i18n/launcher.properties          |   74 +
 launcher/windows/nbproject/configurations.xml      |  126 ++
 launcher/windows/nbproject/project.properties      |   40 +
 launcher/windows/nbproject/project.xml             |   64 +
 launcher/windows/resources/icon.ico                |  Bin 0 -> 300318 bytes
 launcher/windows/resources/nlw-alt.exe.manifest    |   11 +
 launcher/windows/resources/nlw.exe.manifest        |   11 +
 launcher/windows/resources/res.rc                  |   61 +
 launcher/windows/src/Errors.h                      |   72 +
 launcher/windows/src/ExtractUtils.c                |  781 +++++++++
 launcher/windows/src/ExtractUtils.h                |   70 +
 launcher/windows/src/FileUtils.c                   |  613 +++++++
 launcher/windows/src/FileUtils.h                   |   88 +
 launcher/windows/src/JavaUtils.c                   |  799 ++++++++++
 launcher/windows/src/JavaUtils.h                   |   84 +
 launcher/windows/src/Launcher.c                    | 1029 ++++++++++++
 launcher/windows/src/Launcher.h                    |   73 +
 launcher/windows/src/Main.c                        |  692 ++++++++
 launcher/windows/src/Main.h                        |   78 +
 launcher/windows/src/ProcessUtils.c                |  241 +++
 launcher/windows/src/ProcessUtils.h                |   68 +
 launcher/windows/src/RegistryUtils.c               |   80 +
 launcher/windows/src/RegistryUtils.h               |   64 +
 launcher/windows/src/StringUtils.c                 |  814 ++++++++++
 launcher/windows/src/StringUtils.h                 |  169 ++
 launcher/windows/src/SystemUtils.c                 |  120 ++
 launcher/windows/src/SystemUtils.h                 |   64 +
 launcher/windows/src/Types.h                       |  175 ++
 launcher/windows/vcproject/NBI Native Launcher.ncb |    1 +
 launcher/windows/vcproject/NBI Native Launcher.sln |   17 +
 launcher/windows/vcproject/NBI Native Launcher.suo |  Bin 0 -> 50176 bytes
 .../windows/vcproject/NBI Native Launcher.vcproj   |  304 ++++
 .../NBI Native Launcher.vcproj.SARD.dlm198383.user |   65 +
 .../vcproject/NBI Native Launcher.vcproj.user      |    1 +
 92 files changed, 15643 insertions(+)

diff --git a/build.properties b/build.properties
new file mode 100644
index 0000000..4359a3b
--- /dev/null
+++ b/build.properties
@@ -0,0 +1,88 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+#ignore.native=
+
+native.dist.dir=dist
+
+native.jnilib.dir=jnilib
+native.launcher.dir=launcher
+native.cleaner.dir=cleaner
+
+# Native Library properties
+native.jnilib.dir.windows=${native.jnilib.dir}/windows
+native.jnilib.dir.linux=${native.jnilib.dir}/linux
+native.jnilib.dir.solaris-x86=${native.jnilib.dir}/solaris-x86
+native.jnilib.dir.solaris-sparc=${native.jnilib.dir}/solaris-sparc
+native.jnilib.dir.macosx=${native.jnilib.dir}/macosx
+
+native.jnilib.file.windows.i386=windows-x86.dll
+native.jnilib.file.windows.amd64=windows-x64.dll
+native.jnilib.file.windows.ia64=windows-ia64.dll
+native.jnilib.file.linux.i386=linux.so
+native.jnilib.file.linux.amd64=linux-amd64.so
+native.jnilib.file.solaris-x86=solaris-x86.so
+native.jnilib.file.solaris-sparc=solaris-sparc.so
+native.jnilib.file.solaris-amd64=solaris-amd64.so
+native.jnilib.file.solaris-sparcv9=solaris-sparcv9.so
+native.jnilib.file.macosx=macosx.dylib
+
+
+# Native Launcher Properties
+native.launcher.windows.dir=${native.launcher.dir}/windows
+native.launcher.windows.stub.file=nlw.exe
+native.launcher.windows.stub.src=${native.launcher.windows.dir}/dist/${native.launcher.windows.stub.file}
+native.launcher.windows.stub.dst.dir=${native.launcher.windows.dir}
+native.launcher.windows.i18n.dir=${native.launcher.windows.dir}/i18n
+
+native.launcher.unix.dir=${native.launcher.dir}/unix
+native.launcher.unix.stub.file=launcher.sh
+native.launcher.unix.stub.src=${native.launcher.unix.dir}/src/${native.launcher.unix.stub.file}
+native.launcher.unix.stub.dst.dir=${native.launcher.unix.dir}
+native.launcher.unix.i18n.dir=${native.launcher.unix.dir}/i18n
+
+
+# Native on-exit cleaner properties
+native.cleaner.windows.dir=${native.cleaner.dir}/windows
+native.cleaner.windows.srcdir=${native.cleaner.windows.dir}/dist
+native.cleaner.windows.file=cleaner.exe
+
+native.cleaner.unix.dir=${native.cleaner.dir}/unix
+native.cleaner.unix.srcdir=${native.cleaner.unix.dir}/src
+native.cleaner.unix.file=cleaner.sh
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..2378874
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<project name="native" default="default" basedir=".">
+    <property file="build.properties"/>
+    
+    <!-- =======================================================================
+        NetBeans Installer engine specific targets
+    ======================================================================== -->
+
+    <!-- =======================================================================
+        Build native library
+    ======================================================================== -->
+    <target name="jnilib-init" depends="define-platform,init-platform"/>
+    <target name="jnilib-clean" depends="jnilib-init" unless="ignore.native">
+        <exec executable="make" dir="${jnilib.dir}">
+            <arg value="clean"/>
+        </exec>    
+    </target>    
+    
+    <target name="jnilib-compile" depends="jnilib-init,jnilib-clean" unless="ignore.native">
+        <exec executable="make" dir="${jnilib.dir}">
+            <arg value="build"/>
+        </exec>
+    </target>    
+    <target name="jnilib-build"   depends="jnilib-init,jnilib-compile"/>
+
+    <!-- =======================================================================
+        Build launcher
+    ======================================================================== -->
+    <target name="launcher-init" depends="define-platform,init-platform"/>
+    <target name="launcher-clean" depends="launcher-init" unless="ignore.native">
+        <exec executable="make" dir="${launcher.dir}">
+            <arg value="clean"/>
+        </exec>    
+    </target>    
+    
+    <target name="launcher-compile" depends="launcher-init,launcher-clean" if="is.windows" unless="ignore.native">
+        <exec executable="make" dir="${launcher.dir}">
+            <arg value="build"/>
+        </exec>
+    </target>
+    <target name="launcher-build" depends="launcher-init,launcher-compile"/>
+
+
+
+<!-- =======================================================================
+        Build cleaner
+    ======================================================================== -->
+    <target name="cleaner-init" depends="define-platform,init-platform"/>
+    <target name="cleaner-clean" depends="cleaner-init" unless="ignore.native">
+        <exec executable="make" dir="${cleaner.dir}">
+            <arg value="clean"/>
+        </exec>    
+    </target>    
+    
+    <target name="cleaner-compile" depends="cleaner-init,cleaner-clean" if="is.windows" unless="ignore.native">
+        <exec executable="make" dir="${cleaner.dir}">
+            <arg value="build"/>
+        </exec>
+    </target>
+    <target name="cleaner-build" depends="cleaner-init,cleaner-compile"/>
+
+
+<!-- =======================================================================
+        Build all native resources
+    ======================================================================== -->
+
+    <target name="native-clean" depends="jnilib-clean,launcher-clean,cleaner-clean"/>
+    <target name="native-compile" depends="jnilib-compile,launcher-compile,cleaner-compile"/>
+    <target name="native-build" depends="jnilib-build,launcher-build,cleaner-build"/>
+
+    <target name="define-platform">
+        <condition property="is.windows">
+            <os family="windows"/>
+        </condition>
+        <condition property="is.linux">
+            <os name="Linux"/>
+        </condition>
+        <condition property="is.solaris-x86">
+            <os name="SunOS" arch="x86"/>
+        </condition>
+        <condition property="is.solaris-sparc">
+            <os name="SunOS" arch="sparc"/>
+        </condition>
+        <condition property="is.macosx">
+            <and>
+                <os family="mac"/>
+                <os family="unix"/>
+            </and>
+        </condition>
+    </target>
+    
+    <target name="init-platform" depends="init-windows,init-linux,init-solaris-x86,init-solaris-sparc,init-macosx"/>
+    
+    <target name="init-windows" if="is.windows">
+        <property name="jnilib.dir"   value="${native.jnilib.dir.windows}"/>
+        <property name="jnilib.file"  value="${native.jnilib.file.windows}"/>
+	<property name="launcher.dir" value="${native.launcher.windows.dir}"/>
+	<property name="cleaner.dir"  value="${native.cleaner.windows.dir}"/>
+    </target>
+    <target name="init-linux" if="is.linux">
+        <property name="jnilib.dir"   value="${native.jnilib.dir.linux}"/>
+        <property name="jnilib.file"  value="${native.jnilib.file.linux}"/>
+	<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
+	<property name="cleaner.dir"  value="${native.cleaner.unix.dir}"/>
+    </target>
+    <target name="init-solaris-x86" if="is.solaris-x86">
+        <property name="jnilib.dir"   value="${native.jnilib.dir.solaris-x86}"/>
+        <property name="jnilib.file"  value="${native.jnilib.file.solaris-x86}"/>
+	<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
+	<property name="cleaner.dir"  value="${native.cleaner.unix.dir}"/>
+    </target>
+    <target name="init-solaris-sparc" if="is.solaris-sparc">
+        <property name="jnilib.dir"   value="${native.jnilib.dir.solaris-sparc}"/>
+        <property name="jnilib.file"  value="${native.jnilib.file.solaris-sparc}"/>
+	<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
+	<property name="cleaner.dir"  value="${native.cleaner.unix.dir}"/>
+    </target>
+    <target name="init-macosx" if="is.macosx">
+        <property name="jnilib.dir"   value="${native.jnilib.dir.macosx}"/>
+        <property name="jnilib.file"  value="${native.jnilib.file.macosx}"/>
+	<property name="launcher.dir" value="${native.launcher.unix.dir}"/>
+	<property name="cleaner.dir"  value="${native.cleaner.unix.dir}"/>
+    </target>
+    
+</project>
diff --git a/cleaner/unix/src/cleaner.sh b/cleaner/unix/src/cleaner.sh
new file mode 100644
index 0000000..4d91691
--- /dev/null
+++ b/cleaner/unix/src/cleaner.sh
@@ -0,0 +1,112 @@
+#!/bin/sh
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+deleteFiles() {
+        testSymlinkErr=`test -L / > /dev/null`
+        if [ -z "$testSymlinkErr" ] ; then
+            isSymlink=-L
+        else
+            isSymlink=-h
+        fi
+
+	#wait for main thread to finish...
+	sleep 3
+	waitOnError=1
+	tryTimes=3
+	list="$1"
+	if [ -n "$list" ] && [ -f "$list" ] ; then
+		#echo "Using list file : $list"
+		itemsNumber=`wc -l $list | sed "s/^\ *//;s/\ .*//" 2>/dev/null`
+		#echo "Total items : $itemsNumber"
+		counter=1
+		try=$tryTimes
+		allitems=`cat "$list" 2>/dev/null`
+		if [ -f "$list" ] ; then 
+			#echo "... remove cleaner list $list"
+			rm -f "$list"
+		fi
+		while [ $counter -le $itemsNumber ] ; do			
+			file=`echo "$allitems" | sed -n "${counter}p" 2>/dev/null`
+			#echo "entry : $file"
+			result=1
+			if [ -n "$file" ] ; then
+				#echo "... file not zero"
+				if [ $isSymlink "$file" ] || [ -f "$file" ] ; then
+					# file or symlink
+					#echo "deleting [F] $file"
+					rm -f "$file" 2>/dev/null 1>&2
+					if [ $? -ne 0 ] ; then
+						#echo "... can't delete $file"
+						result=0
+					fi 
+				elif [ -d "$file" ] ; then
+					# directory
+					#echo "deleting [D] $file"
+					rmdir "$file" 2>/dev/null 1>&2
+					if [ $? -ne 0 ] ; then 
+						result=0
+						#echo "... can't delete $file"
+					fi
+				fi
+			fi
+			if [ 0 -eq $result ] ; then
+				# try to remove it again after a short wait
+				if [ $try -gt 0 ] ; then	
+					try=`expr "$try" - 1`
+					sleep $waitOnError
+				else
+					#can`t delete.. skip it
+					result=1
+				fi
+				
+			fi
+			if [ 1 -eq $result ] ; then
+				counter=`expr "$counter" + 1`
+				try=$tryTimes
+			fi		
+		done				
+	fi
+	if [ -f "$0" ] ; then 
+		#echo "... remove cleaner itself $0"
+		rm -f "$0"
+	fi
+}
+
+deleteFiles "$@"
diff --git a/cleaner/windows/Makefile b/cleaner/windows/Makefile
new file mode 100644
index 0000000..bf5b7f9
--- /dev/null
+++ b/cleaner/windows/Makefile
@@ -0,0 +1,99 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-pre .build-impl .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post:
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-pre .clean-impl .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+
+.clean-post:
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-pre .clobber-impl .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post:
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-pre .all-impl .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post:
+# Add your post 'all' code here...
+
+
+# help
+help: .help-pre .help-impl .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post:
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
diff --git a/cleaner/windows/Makefile-vc b/cleaner/windows/Makefile-vc
new file mode 100644
index 0000000..b9edda9
--- /dev/null
+++ b/cleaner/windows/Makefile-vc
@@ -0,0 +1,59 @@
+#
+#
+
+
+!include <$(PLATFORM_SDK)/include/win32.mak>
+
+# define the compiler and linker for all the platforms
+CC32="$(VC_2005)\Bin\cl.exe"
+L32="$(VC_2005)\Bin\link.exe"
+
+BUILD_DIR32=.\build\32bit
+OUTPUT_FILE32=.\dist\cleaner.exe
+
+CC32_OPTS=/O1 /Os \
+	/I "$(VC_2005)\include" \
+	/D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" \
+	/FD /GS-\
+	/Fo"$(BUILD_DIR32)\\"  /Fd"$(BUILD_DIR32)\vc80.pdb" \
+	/W3 /nologo /c /Wp64 /TC /errorReport:prompt
+
+LINKING_LIBRARIES=\
+	shell32.lib \
+	kernel32.lib
+
+L32_OPTS=\
+	/OUT:$(OUTPUT_FILE32) \
+	/INCREMENTAL:NO \
+	/LIBPATH:"$(PLATFORM_SDK)\Lib" \
+	/MANIFEST:NO \
+	/NODEFAULTLIB \
+	/SUBSYSTEM:WINDOWS \
+	/OPT:REF /OPT:ICF \
+	/MACHINE:X86 \
+	/ERRORREPORT:PROMPT \
+	/ENTRY:WinMain \
+	$(LINKING_LIBRARIES)
+	
+all: init build-32
+
+clean:
+  
+
+init:
+  - md $(BUILD_DIR32)
+  - md .\dist
+
+  del /Q /S $(BUILD_DIR32)
+  del /Q  $(OUTPUT_FILE32)  
+
+build-32: 
+  Set CPU=i386
+  Set Lib=%VC_2005%\Lib;%PLATFORM_SDK%\Lib;%Lib%
+  Set Include=%PLATFORM_SDK%\Include;%Include%
+  Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
+  Set APPVER=5.01
+  Set TARGETOS=WINNT
+  
+  $(CC32) $(CC32_OPTS) .\src\main.c
+  $(L32) $(L32_OPTS) $(BUILD_DIR32)\main.obj
diff --git a/cleaner/windows/nbproject/configurations.xml b/cleaner/windows/nbproject/configurations.xml
new file mode 100644
index 0000000..83d7e4b
--- /dev/null
+++ b/cleaner/windows/nbproject/configurations.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<configurationDescriptor version="35">
+  <logicalFolder name="root" displayName="root" projectFiles="true">
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>src/main.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="HeaderFiles"
+                   displayName="Header Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="ResourceFiles"
+                   displayName="Resource Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <projectmakefile>Makefile</projectmakefile>
+  <defaultConf>0</defaultConf>
+  <confs>
+    <conf name="Debug" type="1">
+      <toolsSet>
+        <compilerSet>Cygwin</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>3</platform>
+      </toolsSet>
+      <compileType>
+        <linkerTool>
+          <output>dist/cleaner</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerLibItems>
+            <linkerOptionItem>-lshell32 -lkernel32</linkerOptionItem>
+          </linkerLibItems>
+          <commandLine>-mno-cygwin -mwindows</commandLine>
+        </linkerTool>
+      </compileType>
+      <item path="src/main.c">
+        <itemTool>0</itemTool>
+      </item>
+    </conf>
+    <conf name="Release" type="1">
+      <toolsSet>
+        <compilerSet>Cygwin</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>3</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>5</developmentMode>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>5</developmentMode>
+        </ccCompilerTool>
+        <fortranCompilerTool>
+          <developmentMode>5</developmentMode>
+        </fortranCompilerTool>
+        <linkerTool>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="src/main.c">
+        <itemTool>0</itemTool>
+      </item>
+    </conf>
+  </confs>
+</configurationDescriptor>
diff --git a/cleaner/windows/nbproject/project.properties b/cleaner/windows/nbproject/project.properties
new file mode 100644
index 0000000..75bafc2
--- /dev/null
+++ b/cleaner/windows/nbproject/project.properties
@@ -0,0 +1,40 @@
+
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
diff --git a/cleaner/windows/nbproject/project.xml b/cleaner/windows/nbproject/project.xml
new file mode 100644
index 0000000..d8bb645
--- /dev/null
+++ b/cleaner/windows/nbproject/project.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.cnd.makeproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
+            <name>NBI Native Cleaner : Windows</name>
+            <make-project-type>0</make-project-type>
+        </data>
+    </configuration>
+</project>
diff --git a/cleaner/windows/src/main.c b/cleaner/windows/src/main.c
new file mode 100644
index 0000000..21d2d9d
--- /dev/null
+++ b/cleaner/windows/src/main.c
@@ -0,0 +1,493 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <windows.h>
+#include <wchar.h>
+
+
+
+const DWORD SLEEP_DELAY   = 200;
+const DWORD MAX_ATTEPTS   = 15;
+const DWORD THREAD_FINISHED = 100;
+const DWORD INITIAL_DELAY = 2000; // 2 seconds is seems to be enough to finish java process
+const WCHAR * LINE_SEPARATOR = L"\r\n";
+const WCHAR * UNC_PREFIX     = L"\\\\?\\";
+const WCHAR * UNC_STD_PREFIX = L"\\\\";
+const DWORD UNC_PREFIX_LENGTH = 4;
+
+#ifdef _MSC_VER
+#define ZERO(x,y) SecureZeroMemory((x),(y));
+#else
+#define ZERO(x,y) ZeroMemory((x),(y));
+#endif
+
+/*
+ * typedef UINT  (WINAPI * WAIT_PROC)(HANDLE, DWORD);
+ * typedef BOOL  (WINAPI * CLOSE_PROC)(HANDLE);
+ * typedef BOOL  (WINAPI * DELETE_PROC)(LPCWSTR);
+ * typedef VOID  (WINAPI * EXIT_PROC)(DWORD);
+ * typedef VOID  (WINAPI * SLEEP_PROC)(DWORD);
+ *
+ *
+ * typedef struct {
+ * WAIT_PROC	waitObject;
+ * CLOSE_PROC	closeHandle;
+ * DELETE_PROC	deleteFile;
+ * EXIT_PROC	exitProcess;
+ * SLEEP_PROC  sleep;
+ *
+ * HANDLE		hProcess;
+ * WCHAR		szFileName[MAX_PATH];
+ *
+ * } INJECT;
+ */
+WCHAR * search( const WCHAR * wcs1, const WCHAR * wcs2) {
+    WCHAR *cp = (WCHAR *) wcs1;
+    WCHAR *s1, *s2;
+    
+    if ( !*wcs2) {
+        return (WCHAR *)wcs1;
+    }
+    
+    while (*cp) {
+        s1 = cp;
+        s2 = (WCHAR *) wcs2;
+        
+        while ( *s1 && *s2 && !(*s1-*s2) ) {
+            s1++, s2++;
+        }
+        if (!*s2) {
+            return(cp);
+        }
+        cp++;
+    }
+    return(NULL);
+}
+
+/*
+ * DWORD WINAPI RemoteThread(INJECT *remote) {
+ * DWORD count = 0 ;
+ *
+ * remote->waitObject(remote->hProcess, INFINITE);
+ * remote->closeHandle(remote->hProcess);
+ * while(!remote->deleteFile(remote->szFileName) && (count++) < MAX_ATTEPTS) {
+ * remote->sleep(SLEEP_DELAY);
+ * }
+ * remote->exitProcess(0);
+ * return 0;
+ * }
+ *
+ * HANDLE GetRemoteProcess() {
+ * STARTUPINFO si;
+ *
+ * PROCESS_INFORMATION pi;
+ * ZERO( &si, sizeof(si) );
+ * ZERO( &pi, sizeof(pi) );
+ * si.cb = sizeof(si);
+ * if(CreateProcess(0, "explorer.exe", 0, 0, FALSE, CREATE_SUSPENDED|CREATE_NO_WINDOW|IDLE_PRIORITY_CLASS, 0, 0, &si, &pi)) {
+ * CloseHandle(pi.hThread);
+ * return pi.hProcess;
+ * }
+ * else {
+ * return 0;
+ * }
+ * }
+ *
+ * BOOL removeItself() {
+ *
+ * INJECT local, *remote;
+ * BYTE   *code;
+ * HMODULE hKernel32;
+ * HANDLE  hRemoteProcess;
+ * HANDLE  hCurProc;
+ *
+ * DWORD	dwThreadId;
+ * HANDLE	hThread = 0;
+ * DWORD sizeOfCode = 200;
+ *
+ * hRemoteProcess = GetRemoteProcess();
+ *
+ * if(hRemoteProcess == 0) {
+ * return FALSE;
+ * }
+ *
+ * code = VirtualAllocEx(hRemoteProcess, 0, sizeof(INJECT) + sizeOfCode, MEM_RESERVE|MEM_COMMIT, PAGE_EXECUTE_READWRITE);
+ *
+ * if(code == 0) {
+ * CloseHandle(hRemoteProcess);
+ * return FALSE;
+ * }
+ *
+ * hKernel32 = GetModuleHandleW(L"kernel32.dll");
+ * remote = (INJECT *)(code + sizeOfCode);
+ *
+ * local.waitObject      = (WAIT_PROC)  GetProcAddress(hKernel32, "WaitForSingleObject");
+ * local.closeHandle	  = (CLOSE_PROC) GetProcAddress(hKernel32, "CloseHandle");
+ * local.exitProcess	  = (EXIT_PROC)  GetProcAddress(hKernel32, "ExitProcess");
+ * local.deleteFile      = (DELETE_PROC)GetProcAddress(hKernel32, "DeleteFileW");
+ * local.sleep           = (SLEEP_PROC) GetProcAddress(hKernel32, "Sleep");
+ *
+ * // duplicate our own process handle for remote process to wait on
+ * hCurProc = GetCurrentProcess();
+ *
+ * DuplicateHandle(hCurProc, hCurProc, hRemoteProcess, &local.hProcess, 0, FALSE, DUPLICATE_SAME_ACCESS);
+ *
+ * // find name of current executable
+ *
+ * GetModuleFileNameW(NULL, local.szFileName, MAX_PATH);
+ *
+ * // write in code to execute, and the remote structure
+ * WriteProcessMemory(hRemoteProcess, (LPVOID) code,   RemoteThread, sizeOfCode, 0);
+ * WriteProcessMemory(hRemoteProcess, (LPVOID) remote, &local, sizeof(local), 0);
+ *
+ * // execute the code in remote process
+ * hThread = CreateRemoteThread(hRemoteProcess, 0, 0, (LPTHREAD_START_ROUTINE) code, remote, 0, &dwThreadId);
+ *
+ * if(hThread != 0) {
+ * CloseHandle(hThread);
+ * }
+ * return TRUE;
+ * }
+ */
+
+typedef struct _list {
+    WCHAR * item;
+    struct _list * next;
+} LIST;
+
+
+WCHAR * toWCHAR(char * charBuffer, DWORD size) {
+    DWORD i=0;
+    WCHAR * buffer;
+    BOOL hasBOM        = (*charBuffer == '\xFF' && *(charBuffer+1) == '\xFE');
+    BOOL hasReverseBOM = (*charBuffer == '\xFE' && *(charBuffer+1) == '\xFF');
+    
+    char * realStringPtr = charBuffer;
+    if (hasBOM || hasReverseBOM) {
+        size-= 2;
+        realStringPtr+= 2;
+        if(hasReverseBOM) {
+            char c;
+            for (i = 0 ; i < size/2 ; i++) {
+                c = charBuffer [2 * i] ;
+                charBuffer [2 * i] = charBuffer [2 * i + 1] ;
+                charBuffer [2 * i + 1] = c;
+            }
+        }
+    }
+    
+    buffer = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR) * (size/2+1));
+    ZERO(buffer, sizeof(WCHAR) * (size/2+1));
+    for(i=0;i<size/2;i++) {
+        realStringPtr[2*i] = (realStringPtr[2*i]) & 0xFF;
+        realStringPtr[2*i+1] = (realStringPtr[2*i+1])& 0xFF;
+        buffer [i] = ((unsigned char)realStringPtr[2*i]) + (((unsigned char)realStringPtr[2*i+1]) << 8);
+    }
+    
+    return buffer;
+}
+
+DWORD getLinesNumber(WCHAR *str) {
+    DWORD result = 0;
+    WCHAR *ptr = str;
+    WCHAR *ptr2 = str;
+    DWORD sepLength = lstrlenW(LINE_SEPARATOR);
+    if(ptr!=NULL) {
+        while((ptr2 = search(ptr, LINE_SEPARATOR))!=NULL) {
+            ptr = ptr2 + sepLength;
+            result++;
+            
+            if(ptr==NULL)  break;
+        }
+        if(ptr!=NULL && lstrlenW(ptr) > 0) {
+            result ++;
+        }
+    }
+    return result;
+}
+
+void getLines(WCHAR *str, WCHAR *** list, DWORD * number) {
+    WCHAR *ptr = str;
+    WCHAR *ptr2 = NULL;
+    DWORD length = 0;
+    DWORD sepLength = lstrlenW(LINE_SEPARATOR);
+    DWORD counter = 0;
+    *number = getLinesNumber(str);
+    *list = (WCHAR**) LocalAlloc(LPTR, sizeof(WCHAR*) * (*number));
+    
+    if(ptr!=NULL) {
+        while(counter < (*number)) {
+            DWORD i = 0 ;
+            if((ptr2 = search(ptr, LINE_SEPARATOR))!=NULL) {
+                ptr2 = search(ptr, LINE_SEPARATOR) + sepLength;
+                length = lstrlenW(ptr) - lstrlenW(ptr2) - sepLength;
+                (*list) [counter ] = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR*)*(length+1));
+                ZERO((*list) [counter ], sizeof(WCHAR*)*(length+1));
+                for(i=0;i<length;i++) {
+                    (*list) [counter ][i]=ptr[i];
+                }
+                ptr = ptr2;
+            } else if((length = lstrlenW(ptr)) > 0) {
+                (*list)[counter ] = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR*)*(length+1));
+                ZERO((*list) [counter ], sizeof(WCHAR*)*(length+1));
+                for(i=0;i<length;i++) {
+                    (*list) [counter ][i]=ptr[i];
+                }
+                ptr = NULL;
+            }
+            counter++;
+            if(ptr==NULL)  break;
+        }
+    }
+}
+
+
+void readStringList(HANDLE fileHandle, WCHAR *** list, DWORD *number) {
+    DWORD size = GetFileSize(fileHandle, NULL); // hope it much less than 2GB
+    DWORD read = 0;
+    char * charBuffer = (char*) LocalAlloc(LPTR, sizeof(char) * (size + 2));
+    ZERO(charBuffer, sizeof(char) * (size + 2));
+    
+    if(ReadFile(fileHandle, charBuffer, size, &read, 0) && read >=2) {
+        WCHAR * buffer = toWCHAR(charBuffer, size + 2);
+        getLines(buffer, list, number);
+        LocalFree(buffer);
+    }
+    LocalFree(charBuffer);
+}
+
+void deleteFile(WCHAR * filePath) {
+    DWORD count = 0 ;
+    WIN32_FILE_ATTRIBUTE_DATA attrs;
+    DWORD filePathLength = lstrlenW(filePath);
+    DWORD prefixLength = (filePath == search(filePath, UNC_STD_PREFIX)) ? 0 : UNC_PREFIX_LENGTH;
+    DWORD length = filePathLength + prefixLength + 1;
+    WCHAR * file = (WCHAR*) LocalAlloc(LPTR, sizeof(WCHAR) * length);
+    DWORD i=0;
+    for(i=0;i<prefixLength;i++) {
+        file[i]=UNC_PREFIX[i];
+    }
+    for(i=0;i<filePathLength;i++) {
+        file[i+prefixLength] = filePath[i];
+    }
+
+    if(GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) {
+        if(attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+            while((!RemoveDirectoryW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
+                ((count++) < MAX_ATTEPTS))
+                Sleep(SLEEP_DELAY);
+        else
+            while((!DeleteFileW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
+                ((count++) < MAX_ATTEPTS))
+                Sleep(SLEEP_DELAY);
+    }
+    LocalFree(file);
+}
+
+DWORD WINAPI deleteFileThread(void * ptr) {
+    WCHAR * file = (WCHAR*) ptr;
+    deleteFile(file);
+    return THREAD_FINISHED;
+}
+
+void getFreeIndexForNextThread(HANDLE * list, DWORD max, DWORD * counter) {
+    DWORD code = 0;
+    DWORD maxReached = 0;
+    
+    while(1) {
+        if((*counter)==max) {
+            maxReached = 1;
+            *counter = 0;
+        }
+        code = 0;
+        if(list[*counter]==INVALID_HANDLE_VALUE) {
+            break;
+        } else if(GetExitCodeThread(list[*counter], &code)!=0 && code==THREAD_FINISHED) {
+            break;
+        } else {
+            *counter = (*counter) + 1;
+            if((*counter)==max && maxReached == 1) {
+                *counter = WaitForMultipleObjects(max, list, FALSE, INFINITE) - WAIT_OBJECT_0;
+            }
+        }
+    }
+}
+
+#define BUFSIZE 512
+void removeItselfUsingCmd() {
+    char * currentFile = LocalAlloc(LPTR, sizeof(char) * BUFSIZE);    
+    if (GetModuleFileNameA(0, currentFile, MAX_PATH)) {
+        char * tempFile = LocalAlloc(LPTR, sizeof(char) * BUFSIZE);    
+        HANDLE hTempFile;
+        int index = 0;
+        int i = 0;
+        char cleanerSuffix [] = ".bat";
+        for( i = 0; i < (lstrlenA(currentFile) - lstrlenA(cleanerSuffix)); i++) {
+            tempFile[index++] = currentFile[i];
+        }
+        for(i=0;i<lstrlenA(cleanerSuffix);i++) {
+            tempFile[index++] = cleanerSuffix[i];
+        }
+        hTempFile = CreateFileA(tempFile, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);        
+        if (hTempFile != INVALID_HANDLE_VALUE) {
+            char * command = LocalAlloc(LPTR, sizeof(char) * (lstrlenA(tempFile) + lstrlenA(currentFile) + 6));
+            DWORD bytesNumber = 0 ;
+            STARTUPINFO si;
+            PROCESS_INFORMATION pi;   
+            
+            char * strings [4] = {
+                ":Repeat\n",
+                "del %1\n",
+                "if exist %1 goto Repeat\n",
+                "del %0\n",                
+            };
+            for(i=0;i<4;i++) {
+                WriteFile(hTempFile, strings[i], lstrlenA(strings[i]), &bytesNumber, NULL);
+            }
+            
+            CloseHandle(hTempFile);
+            
+            ZERO( &si, sizeof(si) );
+            si.cb = sizeof(si);
+            ZERO( &pi, sizeof(pi) );
+            index=0;
+            command [index++]= '"';
+            for(i=0;i<lstrlenA(tempFile);i++) {
+                command [index++] = tempFile[i];
+            }
+            command[index++]= '"';
+            command[index++]= ' ';
+            command[index++]= '"';
+            for(i=0;i<lstrlenA(currentFile);i++) {
+                command [index++] = currentFile[i];
+            }
+            command[index++]= '"';
+            command[index++]= 0;
+
+            CreateProcess(0, command, 0, 0, FALSE, CREATE_NO_WINDOW | IDLE_PRIORITY_CLASS, 0, 0, &si, &pi);
+            LocalFree(command);
+            CloseHandle( pi.hProcess );
+            CloseHandle( pi.hThread );            
+        }
+        LocalFree(tempFile);
+    }
+    LocalFree(currentFile);
+    
+}
+
+void changeCurrentDirectory() {
+    WCHAR * currentFile = LocalAlloc(LPTR, sizeof(WCHAR) * MAX_PATH);    
+    if (GetModuleFileNameW(0, currentFile, MAX_PATH)) {
+        WCHAR * ptr = currentFile;
+        DWORD i=0;
+        DWORD len=0;
+        WCHAR * parent;
+        while(search(ptr, L"\\")!=NULL) {
+            ptr = search(ptr, L"\\") + 1;
+        }
+        len = lstrlenW(currentFile) - lstrlenW(ptr) - 1;
+        parent = LocalAlloc(LPTR, sizeof(WCHAR) * (len + 1));
+        for(i=0;i<len;i++) {
+            parent[i] = currentFile[i];
+        }
+        parent[len] = 0;
+        SetCurrentDirectoryW(parent);
+        LocalFree(parent);
+    }
+    LocalFree(currentFile);
+}
+
+// should be less or equals to MAXIMUM_WAIT_OBJECTS
+#define MAXIMUM_THREADS MAXIMUM_WAIT_OBJECTS
+
+int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hi, PSTR pszCmdLine, int nCmdShow) {
+//int main(void) {
+    int argumentsNumber = 0;
+    DWORD i=0;
+    DWORD  threadCounter = 0;
+    DWORD dwThread;
+    WCHAR ** commandLine = CommandLineToArgvW(GetCommandLineW(), &argumentsNumber);
+    HANDLE * runningThreads = (HANDLE *) LocalAlloc(LPTR, sizeof(HANDLE) * MAXIMUM_THREADS);
+    
+    for(i=0;i<MAXIMUM_THREADS;i++) {
+        runningThreads[i] = INVALID_HANDLE_VALUE;
+    }
+    changeCurrentDirectory();
+    
+    if(argumentsNumber==2) {
+        WCHAR * filename = commandLine[1];
+        HANDLE fileList = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, 0);
+        if(fileList!=0) {
+            WCHAR ** files = NULL;
+            DWORD number = 0;
+            DWORD allThreadsUsed=0;
+            readStringList(fileList, &files, &number);
+            CloseHandle(fileList);
+            
+            if(files!=NULL) {
+                Sleep(INITIAL_DELAY);
+                for(i=0;i<number;i++) {
+                    WCHAR * file = files[i];
+                    if(file!=NULL) {
+                        if(lstrlenW(file)>0)  {
+                            getFreeIndexForNextThread(runningThreads, MAXIMUM_THREADS, &threadCounter);
+                            runningThreads [threadCounter] = CreateThread( NULL, 0, &deleteFileThread, (LPVOID) file, 0, &dwThread );
+                            threadCounter++;
+                            if(threadCounter==MAXIMUM_THREADS) allThreadsUsed = 1;
+                        }
+                    }
+                }
+                
+                WaitForMultipleObjects(allThreadsUsed ? MAXIMUM_THREADS : threadCounter,
+                        runningThreads, TRUE, INFINITE);
+                
+                for(i=0;i<number;i++) {
+                    if(files[i]!=NULL) LocalFree(files[i]);
+                }
+                
+                LocalFree(files);
+            }
+        }
+    }
+    LocalFree(commandLine);
+    LocalFree(runningThreads);
+    //removeItself();
+    removeItselfUsingCmd();
+    return 0;
+}
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.ncb b/cleaner/windows/vcproject/NBI Native Cleaner.ncb
new file mode 100644
index 0000000..9057eba
--- /dev/null
+++ b/cleaner/windows/vcproject/NBI Native Cleaner.ncb	
@@ -0,0 +1 @@
+Microsoft C/C++ MSF 7.00
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.sln b/cleaner/windows/vcproject/NBI Native Cleaner.sln
new file mode 100644
index 0000000..659a421
--- /dev/null
+++ b/cleaner/windows/vcproject/NBI Native Cleaner.sln	
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NBI Native Cleaner", "NBI Native Cleaner.vcproj", "{0DB81F65-E9E6-4506-BE27-C020AAD1B04A}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{0DB81F65-E9E6-4506-BE27-C020AAD1B04A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0DB81F65-E9E6-4506-BE27-C020AAD1B04A}.Debug|Win32.Build.0 = Debug|Win32
+		{0DB81F65-E9E6-4506-BE27-C020AAD1B04A}.Release|Win32.ActiveCfg = Release|Win32
+		{0DB81F65-E9E6-4506-BE27-C020AAD1B04A}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.suo b/cleaner/windows/vcproject/NBI Native Cleaner.suo
new file mode 100644
index 0000000..189f7a2
Binary files /dev/null and b/cleaner/windows/vcproject/NBI Native Cleaner.suo differ
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.vcproj b/cleaner/windows/vcproject/NBI Native Cleaner.vcproj
new file mode 100644
index 0000000..dd72b1f
--- /dev/null
+++ b/cleaner/windows/vcproject/NBI Native Cleaner.vcproj	
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="NBI Native Cleaner"
+	ProjectGUID="{0DB81F65-E9E6-4506-BE27-C020AAD1B04A}"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="1"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories="C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
+				ExceptionHandling="0"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CompileAs="1"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Shell32.lib"
+				OutputFile="..\dist\cleaner.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="false"
+				AdditionalLibraryDirectories="C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib"
+				GenerateManifest="false"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="false"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				EntryPointSymbol="WinMain"
+				TargetMachine="1"
+				ErrorReporting="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\src\main.c"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user b/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user
new file mode 100644
index 0000000..a5ca4f9
--- /dev/null
+++ b/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user	
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><VisualStudioUserFile ProjectType="Visual C++" Version="8.00" ShowAllFiles="true"></VisualStudioUserFile>
\ No newline at end of file
diff --git a/jnilib/.common/src/CommonUtils.c b/jnilib/.common/src/CommonUtils.c
new file mode 100644
index 0000000..9699f2a
--- /dev/null
+++ b/jnilib/.common/src/CommonUtils.c
@@ -0,0 +1,404 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#include "CommonUtils.h"
+
+jbyteArray getStringBytes(JNIEnv* jEnv, jstring jString) {
+    jbyteArray result = NULL;
+    
+    if (jString != NULL) {
+        jmethodID jGetBytesMethod = (*jEnv)->GetMethodID(jEnv, (*jEnv)->GetObjectClass(jEnv, jString), "getBytes", "()[B");
+        
+        if (jGetBytesMethod != NULL) {
+            jbyteArray jBuffer = (jbyteArray) (*jEnv)->CallObjectMethod(jEnv, jString, jGetBytesMethod);
+            
+            if (jBuffer != NULL) {
+                jsize jLength = (*jEnv)->GetArrayLength(jEnv, jBuffer);
+                
+                result = (*jEnv)->NewByteArray(jEnv, jLength + 1);
+                if (jLength != 0) {
+                    jbyte* jChars = (*jEnv)->GetByteArrayElements(jEnv, jBuffer, NULL);
+                    (*jEnv)->SetByteArrayRegion(jEnv, result, 0, jLength, jChars);
+                    (*jEnv)->ReleaseByteArrayElements(jEnv, jBuffer, jChars, JNI_ABORT);
+                }
+                (*jEnv)->DeleteLocalRef(jEnv, jBuffer);
+            }
+            //(*jEnv)->DeleteLocalRef(jEnv, getBytesMethod);
+        }
+    }
+    
+    return result;
+}
+
+
+jstring newStringFromJByteArray(JNIEnv* jEnv, jbyteArray jByteArray, int length) {
+    jstring result = NULL;
+    
+    jclass jStringClass = (*jEnv)->FindClass(jEnv, "java/lang/String");
+    if (jStringClass != NULL) {
+        jmethodID jStringConstructor = (*jEnv)->GetMethodID(jEnv, jStringClass, "<init>", "([BII)V");
+        
+        if (jStringConstructor != NULL) {
+            result = (jstring) (*jEnv)->NewObject(jEnv, jStringClass, jStringConstructor, jByteArray, 0, length);
+            //(*jEnv)->DeleteLocalRef(jEnv, stringConstructor);
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, jStringClass);
+    }
+    
+    return result;
+}
+
+
+jstring newStringFromJCharArray(JNIEnv* jEnv, jcharArray jCharArray, int length) {
+    jstring result = NULL;
+    
+    jclass jStringClass = (*jEnv)->FindClass(jEnv, "java/lang/String");
+    if (jStringClass != NULL) {
+        jmethodID jStringConstructor = (*jEnv)->GetMethodID(jEnv, jStringClass, "<init>", "([CII)V");
+        
+        if (jStringConstructor != NULL) {
+            result = (jstring) (*jEnv)->NewObject(jEnv, jStringClass, jStringConstructor, jCharArray, 0, length);            
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, jStringClass);
+    }
+    
+    return result;
+}
+
+jstring getString(JNIEnv* jEnv, const char* chars) {
+    return (jstring) getStringWithLength(jEnv, chars, (int) STRLEN(chars));
+}
+
+jstring getStringW(JNIEnv* jEnv, const wchar_t * chars) {
+    return (jstring) getStringWithLengthW(jEnv, chars, (int) WCSLEN(chars));
+}
+
+jstring getStringWithLength(JNIEnv* jEnv, const char* chars, int length) {
+    jstring result = NULL;
+    
+    if (chars != NULL) {
+        if (length == 0) {
+            result = (*jEnv)->NewString(jEnv, (const jchar *) L"", 0);
+        } else {
+            jbyteArray jByteArray = (*jEnv)->NewByteArray(jEnv, length);
+            
+            if (jByteArray != NULL) {
+                (*jEnv)->SetByteArrayRegion(jEnv, jByteArray, 0, length, (jbyte*) chars);
+                result = newStringFromJByteArray(jEnv, jByteArray, length);
+                (*jEnv)->DeleteLocalRef(jEnv, jByteArray);
+            }
+        }
+    }
+    
+    return result;
+}
+
+
+jstring getStringWithLengthW(JNIEnv* jEnv, const wchar_t* chars, int length) {
+    jstring result = NULL;
+    
+    if (chars != NULL) {
+        if (length == 0) {
+            result = (*jEnv)->NewString(jEnv, (const jchar *) L"", 0);
+        } else {
+            jcharArray jCharArray = (*jEnv)->NewCharArray(jEnv, length);
+            
+            if (jCharArray != NULL) {
+                (*jEnv)->SetCharArrayRegion(jEnv, jCharArray, 0, length, (jchar*) chars);
+                result = newStringFromJCharArray(jEnv, jCharArray, length);
+                (*jEnv)->DeleteLocalRef(jEnv, jCharArray);
+            }
+        }
+    }
+    
+    return result;
+}
+
+
+char* getChars(JNIEnv* jEnv, jstring jString) {
+    char* result = NULL;
+    
+    jbyteArray jByteArray = getStringBytes(jEnv, jString);
+    if (jByteArray != NULL) {
+        jbyte* jBytes = (*jEnv)->GetByteArrayElements(jEnv, jByteArray, NULL);
+        
+        long index = 0;
+        if (jBytes != NULL) {
+            int length = (int) STRLEN((char*) jBytes);
+            
+            result = (char*) MALLOC(sizeof(char) * (length + 1));
+            if (result != NULL) {
+                ZERO(result, length);
+                STRNCPY(result, (char*) jBytes, length);
+                result[length] = 0;
+            }
+            (*jEnv)->ReleaseByteArrayElements(jEnv, jByteArray, jBytes, JNI_ABORT);
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, jByteArray);
+    }
+    
+    return result;
+}
+
+char* getStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) {
+    char* result = NULL;
+    
+    jclass clazz = (*jEnv)->GetObjectClass(jEnv, object);
+    if (clazz != NULL) {
+        jmethodID method = (*jEnv)->GetMethodID(jEnv, clazz, methodName, "()Ljava/lang/String;");
+        if (method != NULL) {
+            jstring string = (jstring) (*jEnv)->CallObjectMethod(jEnv, object, method);
+            if (string != NULL) {
+                result = getChars(jEnv, string);
+                (*jEnv)->DeleteLocalRef(jEnv, string);
+            }
+            //(*jEnv)->DeleteLocalRef(jEnv, method);
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, clazz);
+    }
+    
+    return result;
+}
+
+wchar_t * getWideStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) {
+    wchar_t* result = NULL;
+    
+    jclass clazz = (*jEnv)->GetObjectClass(jEnv, object);
+    if (clazz != NULL) {
+        jmethodID method = (*jEnv)->GetMethodID(jEnv, clazz, methodName, "()Ljava/lang/String;");
+        if (method != NULL) {
+            jstring string = (jstring) (*jEnv)->CallObjectMethod(jEnv, object, method);
+            if (string != NULL) {
+                result = getWideChars(jEnv, string);
+                (*jEnv)->DeleteLocalRef(jEnv, string);
+            }
+            //(*jEnv)->DeleteLocalRef(jEnv, method);
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, clazz);
+    }
+    
+    return result;
+}
+
+jboolean isInstanceOf(JNIEnv* jEnv, jobject object, const char* className) {
+    jboolean result = 0;
+    jclass clazz = clazz = (*jEnv)->FindClass(jEnv, className);
+    
+    if (clazz != NULL) {
+        result = (*jEnv)->IsInstanceOf(jEnv, object, clazz);
+        (*jEnv)->DeleteLocalRef(jEnv, clazz);
+    }
+    return result;
+}
+
+jint getIntFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) {
+    jint value = 0;
+    
+    jclass clazz = (*jEnv)->GetObjectClass(jEnv, object);
+    if (clazz != NULL) {
+        jmethodID method = (*jEnv)->GetMethodID(jEnv, clazz, methodName, "()I");
+        if (method != NULL) {
+            value = (*jEnv)->CallIntMethod(jEnv, object, method);
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, clazz);
+    }
+    
+    return value;
+}
+
+void throwException(JNIEnv* jEnv, const char* message) {
+    jclass clazz = (*jEnv)->FindClass(jEnv, "org/netbeans/installer/utils/exceptions/NativeException");
+    if (clazz != NULL) {
+        (*jEnv)->ThrowNew(jEnv, clazz, message);
+        (*jEnv)->DeleteLocalRef(jEnv, clazz);
+    }
+}
+
+void writeLog(JNIEnv* jEnv, int level, const char* message) {
+    const char* prefix = "[jni] ";
+    
+    jclass clazz = (*jEnv)->FindClass(jEnv, "org/netbeans/installer/utils/LogManager");
+    if (clazz != NULL) {
+        jmethodID method = (*jEnv)->GetStaticMethodID(jEnv, clazz, "log", "(ILjava/lang/String;)V");
+        if (method != NULL) {
+            jstring jMessage = NULL;
+            int prefix_length = STRLEN(prefix);
+            int message_length = STRLEN(message);
+            char* string = (char*) MALLOC(sizeof(char) * (prefix_length + message_length + 1));
+            int i = 0;
+            for(i=0;i<prefix_length;i++) {
+               string[i]=prefix[i];
+            }
+            
+            for(i=0;i<message_length;i++) {
+               string[i + prefix_length]=message[i];
+            }
+            string[i+prefix_length + message_length] = '\0';
+
+            
+            jMessage = getString(jEnv, string);
+            
+            if (jMessage != NULL) {
+                (*jEnv)->CallStaticVoidMethod(jEnv, clazz, method, (jint) level, jMessage);
+                (*jEnv)->DeleteLocalRef(jEnv, jMessage);
+            }
+            
+            FREE(string);
+            //(*jEnv)->DeleteLocalRef(jEnv, method);
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, clazz);
+    }
+}
+
+int createDirs(JNIEnv* jEnv, jstring jPath) {
+    int result = 0;
+    jclass jFileClass = (*jEnv)->FindClass(jEnv, "java/io/File");
+    if (jFileClass != NULL) {
+        jmethodID jFileConstructor     = (*jEnv)->GetMethodID(jEnv, jFileClass, "<init>", "(Ljava/lang/String;)V");
+        jmethodID jGetParentFileMethod = (*jEnv)->GetMethodID(jEnv, jFileClass, "getParentFile", "()Ljava/io/File;");
+        jmethodID jExistsMethod        = (*jEnv)->GetMethodID(jEnv, jFileClass, "exists", "()Z");
+        jmethodID jMkdirsMethod        = (*jEnv)->GetMethodID(jEnv, jFileClass, "mkdirs", "()Z");
+        
+        if ((jFileConstructor != NULL) && (jGetParentFileMethod != NULL) && (jExistsMethod != NULL) && (jMkdirsMethod != NULL)) {            
+            jobject jFile = (*jEnv)->NewObject(jEnv, jFileClass, jFileConstructor, jPath);
+            if (jFile != NULL ) {
+                if(!((*jEnv)->CallBooleanMethod(jEnv, jFile, jExistsMethod))) {
+                    jobject jParent = (*jEnv)->CallObjectMethod(jEnv, jFile, jGetParentFileMethod);
+                    if (jParent != NULL) {
+                        result = (*jEnv)->CallBooleanMethod(jEnv, jParent, jExistsMethod);
+                        if (!result) {
+                            result = (*jEnv)->CallBooleanMethod(jEnv, jParent, jMkdirsMethod);
+                        }
+                        (*jEnv)->DeleteLocalRef(jEnv, jParent);
+                    }
+                } else {
+                    result = 1;
+                }
+                (*jEnv)->DeleteLocalRef(jEnv, jFile);
+            }
+        }
+        (*jEnv)->DeleteLocalRef(jEnv, jFileClass);
+    }
+    return result;
+}
+
+int mkdirs(JNIEnv* jEnv, const char *path) {
+    int result = 1;
+    jstring jPath  = getString(jEnv, path);
+    if (jPath != NULL) {
+        result = createDirs(jEnv, jPath);
+        (*jEnv)->DeleteLocalRef(jEnv, jPath);
+    }
+    return result;
+}
+
+
+int mkdirsW(JNIEnv* jEnv, const wchar_t *path) {
+    int result = 1;
+    jstring jPath  = getStringW(jEnv, path);
+    if (jPath != NULL) {        
+        result = createDirs(jEnv, jPath);
+        (*jEnv)->DeleteLocalRef(jEnv, jPath);
+    }
+    
+    return result;
+}
+
+
+
+unsigned char* getByteFromMultiString(JNIEnv *jEnv, jobjectArray jObjectArray, unsigned long* size) {
+    unsigned short * result = NULL;
+    
+    int     totalLength = 0;
+    unsigned int arrayLength = (*jEnv)->GetArrayLength(jEnv, jObjectArray);
+    jstring jString     = NULL;
+    
+    unsigned int i, j; // just counters
+    
+    for (i = 0; i < arrayLength; i++) {
+        jString = (jstring) (*jEnv)->GetObjectArrayElement(jEnv, jObjectArray, i);
+        totalLength += (*jEnv)->GetStringLength(jEnv, jString) + 1;
+    }
+    totalLength++; // add null to the end of array
+      
+    result = (unsigned short*) MALLOC(sizeof(unsigned short) * totalLength);
+    if (result != NULL) {
+        int index = 0 ; 
+        
+        for (i = 0; i < arrayLength; i++) {
+            jString = (jstring) (*jEnv)->GetObjectArrayElement(jEnv, jObjectArray, i);
+            
+            if (jString != NULL) {
+                wchar_t * chars = getWideChars(jEnv, jString);
+                if (chars != NULL) {
+                    for (j = 0; j < (WCSLEN(chars)); j++) {
+                        result[index++] = chars[j];
+                    }
+                    
+                    FREE(chars);
+                }
+            }
+            result[index++] = '\0';            
+        }
+        result[index++] = '\0'; //double \0 at the end        
+    }    
+    * size = sizeof(unsigned short) * totalLength;
+    return (unsigned char*)result;
+}
+
+wchar_t * getWideChars(JNIEnv *jEnv, jstring jString) {
+    if(jString==NULL) {
+        return NULL;
+    } else {
+        long length = (*jEnv)->GetStringLength( jEnv, jString);
+        const jchar * unicodeStr = (*jEnv)->GetStringChars( jEnv, jString, 0 );
+        wchar_t * copy = (wchar_t *) MALLOC(sizeof(wchar_t) * (length + 1));
+        ZERO(copy, sizeof(wchar_t)*(length + 1));        
+        WCSNCPY(copy, (const wchar_t *) unicodeStr, length + 1);
+        (*jEnv)->ReleaseStringChars( jEnv, jString, unicodeStr);
+        return copy;
+    }
+    
+}
diff --git a/jnilib/.common/src/CommonUtils.h b/jnilib/.common/src/CommonUtils.h
new file mode 100644
index 0000000..5047daf
--- /dev/null
+++ b/jnilib/.common/src/CommonUtils.h
@@ -0,0 +1,142 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+#include <wchar.h>
+#include <stdlib.h>
+#ifdef _MSC_VER 
+#include <windows.h>
+#endif
+
+#ifndef _CommonUtils_H
+#define	_CommonUtils_H
+
+
+#ifdef _MSC_VER 
+#define FREE(x) { if((x)!=NULL) { LocalFree(x); (x)=NULL;}}
+#else  
+#define FREE(x) { if((x)!=NULL) {      free(x); (x)=NULL;}}
+#endif
+
+#ifdef _MSC_VER 
+#define MALLOC(x) LocalAlloc(LPTR, x)
+#else  
+#define MALLOC(x) malloc(x)
+#endif
+
+
+#ifdef _MSC_VER
+#define ZERO(x,y) SecureZeroMemory((x),(y))
+#else
+#define ZERO(x,y) memset((x),0,(y))
+#endif
+
+
+#ifdef _MSC_VER
+#define STRLEN(x) lstrlenA(x)
+#else
+#define STRLEN(x) strlen(x)
+#endif
+
+
+#ifdef _MSC_VER
+#define WCSLEN(x) ((unsigned long)lstrlenW(x))
+#else
+#define WCSLEN(x) ((unsigned long)wcslen(x))
+#endif
+
+
+#ifdef _MSC_VER
+#define STRNCPY(x,y,z) lstrcpynA((x),(y),(z))
+#else
+#define STRNCPY(x,y,z) strncpy((x),(y),(z))
+#endif
+
+#ifdef _MSC_VER
+#define WCSNCPY(x,y,z) lstrcpynW((x),(y),(z))
+#else
+#define WCSNCPY(x,y,z) wcsncpy((x),(y),(z))
+#endif
+
+
+#define LOG_DEBUG    4
+#define LOG_MESSAGE  3
+#define LOG_WARNING  2
+#define LOG_ERROR    1
+#define LOG_CRITICAL 0
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+jbyteArray getStringBytes(JNIEnv* jEnv, jstring jString);
+
+jstring newStringFromJByteArray(JNIEnv* jEnv, jbyteArray jByteArray, int length);
+jstring newStringFromJCharArray(JNIEnv* jEnv, jcharArray jCharArray, int length);
+
+jstring getString (JNIEnv* jEnv, const char* chars);
+jstring getStringW(JNIEnv* jEnv, const wchar_t * chars);
+
+
+jstring getStringWithLength(JNIEnv* jEnv, const char* chars, int length);
+jstring getStringWithLengthW(JNIEnv* jEnv, const wchar_t * chars, int length);
+
+char* getChars(JNIEnv* jEnv, jstring jString);
+wchar_t * getWideChars(JNIEnv *jEnv, jstring str);
+
+char* getStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName);
+wchar_t* getWideStringFromMethod(JNIEnv* jEnv, jobject object, const char* methodName) ;
+
+jint getIntFromMethod(JNIEnv* jEnv, jobject object, const char* methodName);
+
+jboolean isInstanceOf(JNIEnv* jEnv, jobject object, const char* className);
+
+void throwException(JNIEnv* jEnv, const char* message);
+
+void writeLog(JNIEnv* jEnv, int level, const char* message);
+
+int mkdirs (JNIEnv* jEnv, const char *path);
+int mkdirsW(JNIEnv* jEnv, const wchar_t *path);
+
+unsigned char* getByteFromMultiString(JNIEnv *jEnv, jobjectArray jObjectArray, unsigned long* size);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _CommonUtils_H */
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.c b/jnilib/.unix/src/jni_UnixNativeUtils.c
new file mode 100644
index 0000000..8b4489c
--- /dev/null
+++ b/jnilib/.unix/src/jni_UnixNativeUtils.c
@@ -0,0 +1,128 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/statvfs.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "../../.common/src/CommonUtils.h"
+#include "jni_UnixNativeUtils.h"
+
+
+jboolean statMode(const char *path, int *mode) {
+    struct stat sb;
+    if (stat(path, &sb) == 0) {
+        *mode = sb.st_mode;
+        return 1;
+    } else {
+        return 0;
+    }
+}
+
+
+JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getFreeSpace0(JNIEnv* jEnv, jobject jObject, jstring jPath) {
+    char* path   = getChars(jEnv, jPath);
+    jlong result = 0;
+    
+    struct statvfs fsstat;
+    if(memset(&fsstat, 0, sizeof(struct statvfs)) != NULL) {
+        if(statvfs(path, &fsstat) == 0) {
+            result = (jlong) fsstat.f_frsize;
+            result *= (jlong) fsstat.f_bfree;
+        }
+    }
+    
+    
+    FREE(path);
+    return result;
+}
+
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_setPermissions0(JNIEnv *jEnv, jobject jObject, jstring jPath, jint jMode, jint jChange) {
+    char* path = getChars(jEnv, jPath);    
+    int currentMode = 0 ;
+    char * msg = NULL;
+    if(statMode(path, &currentMode)) {
+        switch (jChange) {
+            case MODE_CHANGE_SET:
+                currentMode |= (S_IRWXU | S_IRWXG | S_IRWXO);
+                currentMode &= jMode;
+                break;
+            case MODE_CHANGE_ADD:
+                currentMode |= jMode;
+                break;
+            case MODE_CHANGE_REMOVE:
+                currentMode &= ~jMode;
+                break;
+            default:     
+                msg = (char*) malloc(sizeof(char) * 60);
+                memset(msg, 0, sizeof(char) * 60);
+                sprintf(msg, "Selected change mode (%ld) is not supported", jChange);
+                throwException(jEnv, msg);
+                FREE(msg);
+                FREE(path);                
+                return;                
+        }
+        chmod(path, currentMode);
+    } else {
+        throwException(jEnv, "Can`t get file current permissions");
+    }
+    FREE(path);
+}
+
+
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getPermissions0(JNIEnv *jEnv, jobject jObject, jstring jPath) {
+    char* path = getChars(jEnv, jPath);
+    int currentMode;
+    if(statMode(path, &currentMode)) {
+        return currentMode & (S_IRWXU | S_IRWXG | S_IRWXO);
+    } else {
+        throwException(jEnv, "Can`t get file current permissions");
+    }
+    
+    FREE(path);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_isCurrentUserAdmin0 (JNIEnv *jEnv, jobject jObject) {
+    return (geteuid()==0);
+}
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.h b/jnilib/.unix/src/jni_UnixNativeUtils.h
new file mode 100644
index 0000000..8f8c92c
--- /dev/null
+++ b/jnilib/.unix/src/jni_UnixNativeUtils.h
@@ -0,0 +1,103 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+/* Header for class org_netbeans_installer_utils_system_UnixNativeUtils */
+
+#ifndef _Included_org_netbeans_installer_utils_system_UnixNativeUtils
+#define _Included_org_netbeans_installer_utils_system_UnixNativeUtils
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define MODE_RU 1L
+#define MODE_WU 2L
+#define MODE_EU 4L
+#define MODE_RG 8L
+#define MODE_WG 16L
+#define MODE_EG 32L
+#define MODE_RO 64L
+#define MODE_WO 128L
+#define MODE_EO 256L
+    
+#define MODE_CHANGE_SET 1L
+#define MODE_CHANGE_ADD 2L
+#define MODE_CHANGE_REMOVE 4L
+        
+    
+
+/*
+ * Class:     org_netbeans_installer_utils_system_UnixNativeUtils
+ * Method:    getFreeSpace0
+ * Signature: (Ljava/lang/String;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getFreeSpace0
+  (JNIEnv *, jobject, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_UnixNativeUtils
+ * Method:    setPermission0
+ * Signature: (Ljava/lang/String;II)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_setPermissions0
+  (JNIEnv *, jobject, jstring, jint, jint);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_UnixNativeUtils
+ * Method:    getPermissions0
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_getPermissions0
+  (JNIEnv *, jobject, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_UnixNativeUtils
+ * Method:    isCurrentUserAdmin0
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_UnixNativeUtils_isCurrentUserAdmin0
+  (JNIEnv *, jobject);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/jnilib/linux/Makefile b/jnilib/linux/Makefile
new file mode 100644
index 0000000..64e76e1
--- /dev/null
+++ b/jnilib/linux/Makefile
@@ -0,0 +1,129 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+#
+#  There exist several targets which are by default empty and which can be 
+#  used for execution of your targets. These targets are usually executed 
+#  before and after some main targets. They are: 
+#
+#     .build-pre:              called before 'build' target
+#     .build-post:             called after 'build' target
+#     .clean-pre:              called before 'clean' target
+#     .clean-post:             called after 'clean' target
+#     .clobber-pre:            called before 'clobber' target
+#     .clobber-post:           called after 'clobber' target
+#     .all-pre:                called before 'all' target
+#     .all-post:               called after 'all' target
+#     .help-pre:                called before 'help' target
+#     .help-post:               called after 'help' target
+#
+#  Targets beginning with '.' are not intended to be called on their own.
+#
+#  Main targets can be executed directly, and they are:
+#  
+#     build                    build a specific configuration
+#     clean                    remove built files from a configuration
+#     clobber                  remove all built files
+#     all                      build all configurations
+#     help                     print help mesage
+#  
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-pre .build-impl .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post:
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-pre .clean-impl .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+
+.clean-post:
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-pre .clobber-impl .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post:
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-pre .all-impl .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post:
+# Add your post 'all' code here...
+
+
+# help
+help: .help-pre .help-impl .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post:
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
diff --git a/jnilib/linux/nbproject/configurations.xml b/jnilib/linux/nbproject/configurations.xml
new file mode 100644
index 0000000..018e1ec
--- /dev/null
+++ b/jnilib/linux/nbproject/configurations.xml
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<configurationDescriptor version="35">
+  <logicalFolder name="root" displayName="root" projectFiles="true">
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.c</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="HeaderFiles"
+                   displayName="Header Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.h</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.h</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ResourceFiles"
+                   displayName="Resource Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <projectmakefile>Makefile</projectmakefile>
+  <defaultConf>0</defaultConf>
+  <confs>
+    <conf name="Debug" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>2</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/linux</directoryPath>
+          </includeDirectories>
+          <commandLine>-shared -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/linux</directoryPath>
+          </includeDirectories>
+          <commandLine>-shared -m32 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/linux.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Release" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>2</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>5</developmentMode>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>5</developmentMode>
+        </ccCompilerTool>
+        <fortranCompilerTool>
+          <developmentMode>5</developmentMode>
+        </fortranCompilerTool>
+        <linkerTool>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Debug_amd64" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>2</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/linux</directoryPath>
+          </includeDirectories>
+          <commandLine>-shared -fPIC  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/linux</directoryPath>
+          </includeDirectories>
+          <commandLine>-shared -fPIC  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/linux-amd64.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+  </confs>
+</configurationDescriptor>
diff --git a/jnilib/linux/nbproject/project.properties b/jnilib/linux/nbproject/project.properties
new file mode 100644
index 0000000..75bafc2
--- /dev/null
+++ b/jnilib/linux/nbproject/project.properties
@@ -0,0 +1,40 @@
+
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
diff --git a/jnilib/linux/nbproject/project.xml b/jnilib/linux/nbproject/project.xml
new file mode 100644
index 0000000..f47994a
--- /dev/null
+++ b/jnilib/linux/nbproject/project.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.cnd.makeproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
+            <name>NBI Native Library: Linux</name>
+            <make-project-type>0</make-project-type>
+        </data>
+    </configuration>
+</project>
diff --git a/jnilib/macosx/Makefile b/jnilib/macosx/Makefile
new file mode 100644
index 0000000..64e76e1
--- /dev/null
+++ b/jnilib/macosx/Makefile
@@ -0,0 +1,129 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+#
+#  There exist several targets which are by default empty and which can be 
+#  used for execution of your targets. These targets are usually executed 
+#  before and after some main targets. They are: 
+#
+#     .build-pre:              called before 'build' target
+#     .build-post:             called after 'build' target
+#     .clean-pre:              called before 'clean' target
+#     .clean-post:             called after 'clean' target
+#     .clobber-pre:            called before 'clobber' target
+#     .clobber-post:           called after 'clobber' target
+#     .all-pre:                called before 'all' target
+#     .all-post:               called after 'all' target
+#     .help-pre:                called before 'help' target
+#     .help-post:               called after 'help' target
+#
+#  Targets beginning with '.' are not intended to be called on their own.
+#
+#  Main targets can be executed directly, and they are:
+#  
+#     build                    build a specific configuration
+#     clean                    remove built files from a configuration
+#     clobber                  remove all built files
+#     all                      build all configurations
+#     help                     print help mesage
+#  
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-pre .build-impl .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post:
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-pre .clean-impl .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+
+.clean-post:
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-pre .clobber-impl .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post:
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-pre .all-impl .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post:
+# Add your post 'all' code here...
+
+
+# help
+help: .help-pre .help-impl .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post:
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
diff --git a/jnilib/macosx/nbproject/configurations.xml b/jnilib/macosx/nbproject/configurations.xml
new file mode 100644
index 0000000..d08e612
--- /dev/null
+++ b/jnilib/macosx/nbproject/configurations.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+Copyright (c) 2007, 2016 Oracle and/or its affiliates. All rights reserved.
+
+Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+Other names may be trademarks of their respective owners.
+
+The contents of this file are subject to the terms of either the GNU
+General Public License Version 2 only ("GPL") or the Common
+Development and Distribution License("CDDL") (collectively, the
+"License"). You may not use this file except in compliance with the
+License. You can obtain a copy of the License at
+http://www.netbeans.org/cddl-gplv2.html
+or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+specific language governing permissions and limitations under the
+License.  When distributing the software, include this License Header
+Notice in each file and include the License file at
+nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the GPL Version 2 section of the License file that
+accompanied this code. If applicable, add the following below the
+License Header, with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+If you wish your version of this file to be governed by only the CDDL
+or only the GPL Version 2, indicate your decision by adding
+"[Contributor] elects to include this software in this distribution
+under the [CDDL or GPL Version 2] license." If you do not indicate a
+single choice of license, a recipient has the option to distribute
+your version of this file under either the CDDL, the GPL Version 2 or
+to extend the choice of license to its licensees as provided above.
+However, if you add GPL Version 2 code and therefore, elected the GPL
+Version 2 license, then the option applies only if the new code is
+made subject to such option by the copyright holder.
+
+Contributor(s):
+-->
+<configurationDescriptor version="45">
+  <logicalFolder name="root" displayName="root" projectFiles="true">
+    <logicalFolder name="HeaderFiles"
+                   displayName="Header Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.h</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.h</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ResourceFiles"
+                   displayName="Resource Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.c</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <sourceEncoding>UTF-8</sourceEncoding>
+  <projectmakefile>Makefile</projectmakefile>
+  <confs>
+    <conf name="Debug" type="2">
+      <toolsSet>
+        <compilerSet>GNU|GNU</compilerSet>
+        <platform>4</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/Library/Java/Home/include</directoryPath>
+          </includeDirectories>
+          <commandLine>-arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -dynamiclib</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/Library/Java/Home/include</directoryPath>
+          </includeDirectories>
+          <commandLine>-arch i386 -arch ppc -arch ppc64 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -dynamiclib</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/macosx.dylib</output>
+          <linkerLibItems>
+          </linkerLibItems>
+          <commandLine>-Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -arch ppc64 -arch x86_64</commandLine>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Release" type="2">
+      <toolsSet>
+        <compilerSet>GNU|GNU</compilerSet>
+        <platform>4</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>5</developmentMode>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>5</developmentMode>
+        </ccCompilerTool>
+        <fortranCompilerTool>
+          <developmentMode>5</developmentMode>
+        </fortranCompilerTool>
+        <linkerTool>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+  </confs>
+</configurationDescriptor>
diff --git a/jnilib/macosx/nbproject/project.properties b/jnilib/macosx/nbproject/project.properties
new file mode 100644
index 0000000..75bafc2
--- /dev/null
+++ b/jnilib/macosx/nbproject/project.properties
@@ -0,0 +1,40 @@
+
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
diff --git a/jnilib/macosx/nbproject/project.xml b/jnilib/macosx/nbproject/project.xml
new file mode 100644
index 0000000..08fb3de
--- /dev/null
+++ b/jnilib/macosx/nbproject/project.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.cnd.makeproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
+            <name>NBI Native Library: MacOS X</name>
+            <make-project-type>0</make-project-type>
+            <make-dep-projects/>
+        </data>
+    </configuration>
+</project>
diff --git a/jnilib/solaris-sparc/Makefile b/jnilib/solaris-sparc/Makefile
new file mode 100644
index 0000000..64e76e1
--- /dev/null
+++ b/jnilib/solaris-sparc/Makefile
@@ -0,0 +1,129 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+#
+#  There exist several targets which are by default empty and which can be 
+#  used for execution of your targets. These targets are usually executed 
+#  before and after some main targets. They are: 
+#
+#     .build-pre:              called before 'build' target
+#     .build-post:             called after 'build' target
+#     .clean-pre:              called before 'clean' target
+#     .clean-post:             called after 'clean' target
+#     .clobber-pre:            called before 'clobber' target
+#     .clobber-post:           called after 'clobber' target
+#     .all-pre:                called before 'all' target
+#     .all-post:               called after 'all' target
+#     .help-pre:                called before 'help' target
+#     .help-post:               called after 'help' target
+#
+#  Targets beginning with '.' are not intended to be called on their own.
+#
+#  Main targets can be executed directly, and they are:
+#  
+#     build                    build a specific configuration
+#     clean                    remove built files from a configuration
+#     clobber                  remove all built files
+#     all                      build all configurations
+#     help                     print help mesage
+#  
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-pre .build-impl .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post:
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-pre .clean-impl .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+
+.clean-post:
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-pre .clobber-impl .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post:
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-pre .all-impl .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post:
+# Add your post 'all' code here...
+
+
+# help
+help: .help-pre .help-impl .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post:
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
diff --git a/jnilib/solaris-sparc/nbproject/configurations.xml b/jnilib/solaris-sparc/nbproject/configurations.xml
new file mode 100644
index 0000000..f37cec3
--- /dev/null
+++ b/jnilib/solaris-sparc/nbproject/configurations.xml
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<configurationDescriptor version="35">
+  <logicalFolder name="root" displayName="root" projectFiles="true">
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.c</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="HeaderFiles"
+                   displayName="Header Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.h</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.h</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ResourceFiles"
+                   displayName="Resource Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <projectmakefile>Makefile</projectmakefile>
+  <defaultConf>0</defaultConf>
+  <confs>
+    <conf name="Debug" type="2">
+      <toolsSet>
+        <compilerSet>Sun12</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>0</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-sparc.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Release" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>0</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>5</developmentMode>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>5</developmentMode>
+        </ccCompilerTool>
+        <fortranCompilerTool>
+          <developmentMode>5</developmentMode>
+        </fortranCompilerTool>
+        <linkerTool>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Debug_x64" type="2">
+      <toolsSet>
+        <compilerSet>Sun12</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>0</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-sparcv9.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Debug_gnu" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>0</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-sparc.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Debug_x64_gnu" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>0</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-fPIC -shared -static-libgcc -mimpure-text -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-sparcv9.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+  </confs>
+</configurationDescriptor>
diff --git a/jnilib/solaris-sparc/nbproject/project.properties b/jnilib/solaris-sparc/nbproject/project.properties
new file mode 100644
index 0000000..75bafc2
--- /dev/null
+++ b/jnilib/solaris-sparc/nbproject/project.properties
@@ -0,0 +1,40 @@
+
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
diff --git a/jnilib/solaris-sparc/nbproject/project.xml b/jnilib/solaris-sparc/nbproject/project.xml
new file mode 100644
index 0000000..be61aca
--- /dev/null
+++ b/jnilib/solaris-sparc/nbproject/project.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.cnd.makeproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
+            <name>NBI Native Library: Solaris Sparc</name>
+            <make-project-type>0</make-project-type>
+        </data>
+    </configuration>
+</project>
diff --git a/jnilib/solaris-x86/Makefile b/jnilib/solaris-x86/Makefile
new file mode 100644
index 0000000..64e76e1
--- /dev/null
+++ b/jnilib/solaris-x86/Makefile
@@ -0,0 +1,129 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+#
+#  There exist several targets which are by default empty and which can be 
+#  used for execution of your targets. These targets are usually executed 
+#  before and after some main targets. They are: 
+#
+#     .build-pre:              called before 'build' target
+#     .build-post:             called after 'build' target
+#     .clean-pre:              called before 'clean' target
+#     .clean-post:             called after 'clean' target
+#     .clobber-pre:            called before 'clobber' target
+#     .clobber-post:           called after 'clobber' target
+#     .all-pre:                called before 'all' target
+#     .all-post:               called after 'all' target
+#     .help-pre:                called before 'help' target
+#     .help-post:               called after 'help' target
+#
+#  Targets beginning with '.' are not intended to be called on their own.
+#
+#  Main targets can be executed directly, and they are:
+#  
+#     build                    build a specific configuration
+#     clean                    remove built files from a configuration
+#     clobber                  remove all built files
+#     all                      build all configurations
+#     help                     print help mesage
+#  
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-pre .build-impl .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post:
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-pre .clean-impl .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+
+.clean-post:
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-pre .clobber-impl .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post:
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-pre .all-impl .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post:
+# Add your post 'all' code here...
+
+
+# help
+help: .help-pre .help-impl .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post:
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
diff --git a/jnilib/solaris-x86/nbproject/configurations.xml b/jnilib/solaris-x86/nbproject/configurations.xml
new file mode 100644
index 0000000..ec55f70
--- /dev/null
+++ b/jnilib/solaris-x86/nbproject/configurations.xml
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<configurationDescriptor version="35">
+  <logicalFolder name="root" displayName="root" projectFiles="true">
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.c</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="HeaderFiles"
+                   displayName="Header Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.h</itemPath>
+      <itemPath>../.unix/src/jni_UnixNativeUtils.h</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ResourceFiles"
+                   displayName="Resource Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <projectmakefile>Makefile</projectmakefile>
+  <defaultConf>0</defaultConf>
+  <confs>
+    <conf name="Debug" type="2">
+      <toolsSet>
+        <compilerSet>Sun12</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>1</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -fPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-x86.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Release" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>0</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>5</developmentMode>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>5</developmentMode>
+        </ccCompilerTool>
+        <fortranCompilerTool>
+          <developmentMode>5</developmentMode>
+        </fortranCompilerTool>
+        <linkerTool>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Debug_x64" type="2">
+      <toolsSet>
+        <compilerSet>Sun12</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>1</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-KPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-KPIC -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -xO2 -Xa</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-amd64.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Debug_gnu" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>1</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-m32 -fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-x86.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Debug_x64_gnu" type="2">
+      <toolsSet>
+        <compilerSet>GNU</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>1</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <sixtyfourBits>true</sixtyfourBits>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/solaris</directoryPath>
+          </includeDirectories>
+          <commandLine>-fPIC -static-libgcc -shared -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/solaris-amd64.so</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerNorunpath>false</linkerNorunpath>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.unix/src/jni_UnixNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+  </confs>
+</configurationDescriptor>
diff --git a/jnilib/solaris-x86/nbproject/project.properties b/jnilib/solaris-x86/nbproject/project.properties
new file mode 100644
index 0000000..75bafc2
--- /dev/null
+++ b/jnilib/solaris-x86/nbproject/project.properties
@@ -0,0 +1,40 @@
+
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
diff --git a/jnilib/solaris-x86/nbproject/project.xml b/jnilib/solaris-x86/nbproject/project.xml
new file mode 100644
index 0000000..3fd2701
--- /dev/null
+++ b/jnilib/solaris-x86/nbproject/project.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.cnd.makeproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
+            <name>NBI Native Library: Solaris X86</name>
+            <make-project-type>0</make-project-type>
+        </data>
+    </configuration>
+</project>
diff --git a/jnilib/windows/Makefile b/jnilib/windows/Makefile
new file mode 100644
index 0000000..64e76e1
--- /dev/null
+++ b/jnilib/windows/Makefile
@@ -0,0 +1,129 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+#
+#  There exist several targets which are by default empty and which can be 
+#  used for execution of your targets. These targets are usually executed 
+#  before and after some main targets. They are: 
+#
+#     .build-pre:              called before 'build' target
+#     .build-post:             called after 'build' target
+#     .clean-pre:              called before 'clean' target
+#     .clean-post:             called after 'clean' target
+#     .clobber-pre:            called before 'clobber' target
+#     .clobber-post:           called after 'clobber' target
+#     .all-pre:                called before 'all' target
+#     .all-post:               called after 'all' target
+#     .help-pre:                called before 'help' target
+#     .help-post:               called after 'help' target
+#
+#  Targets beginning with '.' are not intended to be called on their own.
+#
+#  Main targets can be executed directly, and they are:
+#  
+#     build                    build a specific configuration
+#     clean                    remove built files from a configuration
+#     clobber                  remove all built files
+#     all                      build all configurations
+#     help                     print help mesage
+#  
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-pre .build-impl .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post:
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-pre .clean-impl .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+
+.clean-post:
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-pre .clobber-impl .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post:
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-pre .all-impl .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post:
+# Add your post 'all' code here...
+
+
+# help
+help: .help-pre .help-impl .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post:
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
diff --git a/jnilib/windows/Makefile-vc b/jnilib/windows/Makefile-vc
new file mode 100644
index 0000000..131aee1
--- /dev/null
+++ b/jnilib/windows/Makefile-vc
@@ -0,0 +1,76 @@
+#
+#
+
+
+!include <$(PLATFORM_SDK)/include/win32.mak>
+
+# define the compiler and linker for all the platforms
+CC32="$(VC_2005)\Bin\cl.exe"
+L32="$(VC_2005)\Bin\link.exe"
+
+CC32_OPTS=/O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_STATIC_CPPLIB" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MT /Fo".\build\32bit\\" /W3 /WX /c /Wp64 /Gd /TC 
+L32_OPTS=/OUT:".\dist\windows-x86.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+
+
+CC64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\cl.exe"
+L64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\link.exe"
+
+CC64_OPTS=/O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_STATIC_CPPLIB" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MT /Fo".\build\64bit\\" /W3 /c /Wp64 /Gd /TC 
+L64_OPTS=/OUT:".\dist\windows-x64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\amd64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:AMD64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib bufferoverflowU.lib
+
+CCIA64="$(PLATFORM_SDK)\Bin\win64\cl.exe"
+LIA64="$(PLATFORM_SDK)\Bin\win64\link.exe"
+
+CCIA64_OPTS=/O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_STATIC_CPPLIB" /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MT /Fo".\build\ia64\\" /W3 /c /Wp64 /Gd /TC 
+LIA64_OPTS=/OUT:".\dist\windows-ia64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\ia64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:IA64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib bufferoverflowU.lib
+
+
+all: init build-32 build-64 build-ia64
+
+init:
+  - md .\build\32bit
+  - md .\build\64bit
+  - md .\build\ia64
+  - md .\dist
+
+  del /Q /S build
+
+  del /Q .\dist\windows-x86.*
+  del /Q .\dist\windows-x64.*
+  del /Q .\dist\windows-ia64.*
+
+build-32: 
+  Set CPU=i386
+  Set Lib=%PLATFORM_SDK%\Lib;%Lib%
+  Set Include=%PLATFORM_SDK%\Include;%Include%
+  Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
+  Set APPVER=5.01
+  Set TARGETOS=WINNT
+
+  $(CC32) $(CC32_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
+  $(L32) $(L32_OPTS) ".\build\32bit\WindowsUtils.obj" ".\build\32bit\jni_WindowsRegistry.obj" ".\build\32bit\jni_WindowsNativeUtils.obj" ".\build\32bit\CommonUtils.obj"
+  
+
+build-64:
+  Set CPU=AMD64
+  Set Lib=%PLATFORM_SDK%\Lib\AMD64;%PLATFORM_SDK%\Lib\AMD64\atlmfc;
+  Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
+  Set Path=%PLATFORM_SDK%\Bin\Win64\x86\AMD64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
+  Set APPVER=5.02
+  Set TARGETOS=WINNT
+
+  $(CC64) $(CC64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
+  $(L64) $(L64_OPTS) ".\build\64bit\WindowsUtils.obj" ".\build\64bit\jni_WindowsRegistry.obj" ".\build\64bit\jni_WindowsNativeUtils.obj" ".\build\64bit\CommonUtils.obj"
+
+
+build-ia64:
+  Set CPU=IA64
+  Set Lib=%PLATFORM_SDK%\Lib\IA64;%PLATFORM_SDK%\Lib\IA64\atlmfc;
+  Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
+  Set Path=%PLATFORM_SDK%\Bin\Win64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
+  Set APPVER=5.02
+  Set TARGETOS=WINNT
+
+  $(CCIA64) $(CCIA64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
+  $(LIA64) $(LIA64_OPTS) ".\build\ia64\WindowsUtils.obj" ".\build\ia64\jni_WindowsRegistry.obj" ".\build\ia64\jni_WindowsNativeUtils.obj" ".\build\ia64\CommonUtils.obj"
+
diff --git a/jnilib/windows/Makefile-vc-wo-crt b/jnilib/windows/Makefile-vc-wo-crt
new file mode 100644
index 0000000..e344b28
--- /dev/null
+++ b/jnilib/windows/Makefile-vc-wo-crt
@@ -0,0 +1,79 @@
+#
+#
+
+
+!include <$(PLATFORM_SDK)/include/win32.mak>
+
+# define the compiler and linker for all the platforms
+CC32="$(VC_2005)\Bin\cl.exe"
+L32="$(VC_2005)\Bin\link.exe"
+
+L32_LIBS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+CC32_OPTS=/GS- /O1 /Os /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS"  /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MD /Fo".\build\32bit\\" /W3 /WX /c /Wp64 /Gd /TC 
+L32_OPTS=/NOENTRY /NODEFAULTLIB /OUT:".\dist\windows-x86.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 $(L32_LIBS)
+
+
+CC64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\cl.exe"
+L64="$(PLATFORM_SDK)\Bin\win64\x86\AMD64\link.exe"
+
+L64_LIBS=$(L32_LIBS)
+CC64_OPTS=/O1 /Os /GS- /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE"  /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MD  /Fo".\build\64bit\\" /W3 /c /Wp64 /Gd /TC 
+L64_OPTS=/NOENTRY /NODEFAULTLIB /OUT:".\dist\windows-x64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\amd64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:AMD64 $(L64_LIBS)
+
+CCIA64="$(PLATFORM_SDK)\Bin\win64\cl.exe"
+LIA64="$(PLATFORM_SDK)\Bin\win64\link.exe"
+
+LIA64_LIBS=$(L32_LIBS)
+CCIA64_OPTS=/O1 /Os /GS- /I "$(VC_2005)\include" /I "$(PLATFORM_SDK)\Include" /I "$(PLATFORM_SDK)\Include\win64\crt\amd64" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "NBIJNILIBRARY_EXPORTS" /D "_CRT_SECURE_NO_DEPRECATE"  /D "_LITTLE_ENDIAN" /D "_WINDLL" /FD /MD  /Fo".\build\ia64\\" /W3 /c /Wp64 /Gd /TC 
+LIA64_OPTS=/NOENTRY /NODEFAULTLIB /OUT:".\dist\windows-ia64.dll" /INCREMENTAL:NO /LIBPATH:"$(PLATFORM_SDK)\Lib\ia64" /LIBPATH:"$(VC_2005)\lib" /DLL /MANIFEST:NO /IGNOREIDL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:IA64 $(LIA64_LIBS)
+
+
+all: init build-32 build-64 build-ia64
+
+init:
+  - md .\build\32bit
+  - md .\build\64bit
+  - md .\build\ia64
+  - md .\dist
+
+  del /Q /S build
+
+  del /Q .\dist\windows-x86.*
+  del /Q .\dist\windows-x64.*
+  del /Q .\dist\windows-ia64.*
+
+build-32: 
+  Set CPU=i386
+  Set Lib=%PLATFORM_SDK%\Lib;%Lib%
+  Set Include=%PLATFORM_SDK%\Include;%Include%
+  Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
+  Set APPVER=5.01
+  Set TARGETOS=WINNT
+
+  $(CC32) $(CC32_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
+  $(L32) $(L32_OPTS) ".\build\32bit\WindowsUtils.obj" ".\build\32bit\jni_WindowsRegistry.obj" ".\build\32bit\jni_WindowsNativeUtils.obj" ".\build\32bit\CommonUtils.obj"
+  
+
+build-64:
+  Set CPU=AMD64
+  Set Lib=%PLATFORM_SDK%\Lib\AMD64;%PLATFORM_SDK%\Lib\AMD64\atlmfc;
+  Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
+  Set Path=%PLATFORM_SDK%\Bin\Win64\x86\AMD64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
+  Set APPVER=5.02
+  Set TARGETOS=WINNT
+
+  $(CC64) $(CC64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
+  $(L64) $(L64_OPTS) ".\build\64bit\WindowsUtils.obj" ".\build\64bit\jni_WindowsRegistry.obj" ".\build\64bit\jni_WindowsNativeUtils.obj" ".\build\64bit\CommonUtils.obj"
+
+
+build-ia64:
+  Set CPU=IA64
+  Set Lib=%PLATFORM_SDK%\Lib\IA64;%PLATFORM_SDK%\Lib\IA64\atlmfc;
+  Set Include=%PLATFORM_SDK%\Include;%PLATFORM_SDK%\Include\crt;%PLATFORM_SDK%\Include\crt\sys;%PLATFORM_SDK%\Include\mfc;%PLATFORM_SDK%\Include\atl
+  Set Path=%PLATFORM_SDK%\Bin\Win64;%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%path%
+  Set APPVER=5.02
+  Set TARGETOS=WINNT
+
+  $(CCIA64) $(CCIA64_OPTS) .\src\WindowsUtils.c .\src\jni_WindowsRegistry.c .\src\jni_WindowsNativeUtils.c .\..\.common\src\CommonUtils.c
+  $(LIA64) $(LIA64_OPTS) ".\build\ia64\WindowsUtils.obj" ".\build\ia64\jni_WindowsRegistry.obj" ".\build\ia64\jni_WindowsNativeUtils.obj" ".\build\ia64\CommonUtils.obj"
+
diff --git a/jnilib/windows/nbproject/configurations.xml b/jnilib/windows/nbproject/configurations.xml
new file mode 100644
index 0000000..8cb7437
--- /dev/null
+++ b/jnilib/windows/nbproject/configurations.xml
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<configurationDescriptor version="35">
+  <logicalFolder name="root" displayName="root" projectFiles="true">
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.c</itemPath>
+      <itemPath>src/jni_WindowsNativeUtils.c</itemPath>
+      <itemPath>src/jni_WindowsRegistry.c</itemPath>
+      <itemPath>src/WindowsUtils.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="HeaderFiles"
+                   displayName="Header Files"
+                   projectFiles="true">
+      <itemPath>../.common/src/CommonUtils.h</itemPath>
+      <itemPath>src/jni_WindowsNativeUtils.h</itemPath>
+      <itemPath>src/jni_WindowsRegistry.h</itemPath>
+      <itemPath>src/WindowsUtils.h</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ResourceFiles"
+                   displayName="Resource Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <projectmakefile>Makefile</projectmakefile>
+  <defaultConf>0</defaultConf>
+  <confs>
+    <conf name="Default-32bit" type="2">
+      <toolsSet>
+        <compilerSet>Cygwin</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>3</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/win32</directoryPath>
+          </includeDirectories>
+          <commandLine>-mno-cygwin</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include\win32</directoryPath>
+          </includeDirectories>
+          <commandLine>-mno-cygwin</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/windows.dll</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerLibItems>
+            <linkerOptionItem>-lole32</linkerOptionItem>
+            <linkerOptionItem>-luuid</linkerOptionItem>
+          </linkerLibItems>
+          <commandLine>-Wl,--add-stdcall-alias</commandLine>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="src/WindowsUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="src/WindowsUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="src/jni_WindowsNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="src/jni_WindowsNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="src/jni_WindowsRegistry.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="src/jni_WindowsRegistry.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+    <conf name="Default-64bit" type="2">
+      <toolsSet>
+        <compilerSet>Cygwin</compilerSet>
+        <cRequired>true</cRequired>
+        <cppRequired>true</cppRequired>
+        <fortranRequired>false</fortranRequired>
+        <platform>3</platform>
+      </toolsSet>
+      <compileType>
+        <cCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include/win32</directoryPath>
+          </includeDirectories>
+          <commandLine>-mno-cygwin</commandLine>
+        </cCompilerTool>
+        <ccCompilerTool>
+          <developmentMode>0</developmentMode>
+          <stripSymbols>true</stripSymbols>
+          <includeDirectories>
+            <directoryPath>/usr/java/include</directoryPath>
+            <directoryPath>/usr/java/include\win32</directoryPath>
+          </includeDirectories>
+          <commandLine>-mno-cygwin</commandLine>
+        </ccCompilerTool>
+        <linkerTool>
+          <output>dist/windows.dll</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerLibItems>
+            <linkerOptionItem>-lole32</linkerOptionItem>
+            <linkerOptionItem>-luuid</linkerOptionItem>
+          </linkerLibItems>
+          <commandLine>-Wl,--add-stdcall-alias</commandLine>
+        </linkerTool>
+      </compileType>
+      <item path="../.common/src/CommonUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="../.common/src/CommonUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="src/WindowsUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="src/WindowsUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="src/jni_WindowsNativeUtils.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="src/jni_WindowsNativeUtils.h">
+        <itemTool>3</itemTool>
+      </item>
+      <item path="src/jni_WindowsRegistry.c">
+        <itemTool>0</itemTool>
+      </item>
+      <item path="src/jni_WindowsRegistry.h">
+        <itemTool>3</itemTool>
+      </item>
+    </conf>
+  </confs>
+</configurationDescriptor>
diff --git a/jnilib/windows/nbproject/project.properties b/jnilib/windows/nbproject/project.properties
new file mode 100644
index 0000000..75bafc2
--- /dev/null
+++ b/jnilib/windows/nbproject/project.properties
@@ -0,0 +1,40 @@
+
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
diff --git a/jnilib/windows/nbproject/project.xml b/jnilib/windows/nbproject/project.xml
new file mode 100644
index 0000000..a3307ff
--- /dev/null
+++ b/jnilib/windows/nbproject/project.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.cnd.makeproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
+            <name>NBI Native Library: Windows</name>
+            <make-project-type>0</make-project-type>
+        </data>
+    </configuration>
+</project>
diff --git a/jnilib/windows/src/WindowsUtils.c b/jnilib/windows/src/WindowsUtils.c
new file mode 100644
index 0000000..b658710
--- /dev/null
+++ b/jnilib/windows/src/WindowsUtils.c
@@ -0,0 +1,166 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+#include <windows.h>
+#include <winreg.h>
+#include <winnt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <malloc.h>
+
+#include "../../.common/src/CommonUtils.h"
+#include "WindowsUtils.h"
+#include "jni_WindowsRegistry.h"
+
+HKEY getHKEY(jint jSection) {
+    switch (jSection) {
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CLASSES_ROOT:
+            return HKEY_CLASSES_ROOT;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_USER:
+            return HKEY_CURRENT_USER;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_LOCAL_MACHINE:
+            return HKEY_LOCAL_MACHINE;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_USERS:
+            return HKEY_USERS;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_CONFIG:
+            return HKEY_CURRENT_CONFIG;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_DYN_DATA:
+            return HKEY_DYN_DATA;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_DATA:
+            return HKEY_PERFORMANCE_DATA;
+        default:
+            return NULL;
+    }
+}
+
+LONG getMode(jint jmode) {
+    switch (jmode) {
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_DEFAULT:
+            return 0L;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_32BIT:
+            return KEY_WOW64_32KEY;
+        case org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_64BIT:
+            return KEY_WOW64_64KEY;
+        default:
+            return 0L;
+    }
+}
+
+
+int queryValue(int mode, HKEY section, const unsigned short* key, const unsigned short* name, DWORD* type, DWORD* size, byte** value, int expand) {
+    int result = 1;
+    
+    HKEY hkey = 0;
+    int tempType = 0;
+    int tempSize = 0;
+    byte* tempValue = NULL;
+    
+    if (RegOpenKeyExW(section, key, 0, KEY_QUERY_VALUE | mode, &hkey) == ERROR_SUCCESS) {
+        if (RegQueryValueExW(hkey, name, NULL, (LPDWORD) &tempType, NULL, (LPDWORD) &tempSize) == ERROR_SUCCESS) {
+            tempValue = (byte*) MALLOC(tempSize + 8);
+            
+            if (tempValue != NULL) {
+                ZERO(tempValue, tempSize + 8);
+                
+                if (RegQueryValueExW(hkey, name, NULL, (LPDWORD) &tempType, tempValue, (LPDWORD) &tempSize) == ERROR_SUCCESS) {
+                    if (expand && (tempType == REG_EXPAND_SZ)) {
+                        int expandedSize = (int) WCSLEN((unsigned short*) tempValue) + 2;
+                        byte* expandedValue = (byte*) MALLOC(expandedSize * sizeof(wchar_t));
+                        int expandedCharsNumber = 0;
+                        ZERO(expandedValue, expandedSize);
+                        expandedCharsNumber = ExpandEnvironmentStringsW((unsigned short*) tempValue, (unsigned short*) expandedValue, tempSize);
+                        if (expandedCharsNumber > tempSize) {
+                            FREE(expandedValue);
+                            expandedValue       = (byte*) MALLOC(expandedCharsNumber * sizeof(wchar_t));
+                            expandedCharsNumber = ExpandEnvironmentStringsW((unsigned short*) tempValue, (unsigned short*) expandedValue, expandedCharsNumber);
+                        }
+                        
+                        FREE(tempValue);
+                        tempValue = expandedValue;
+                    }
+                } else {
+                    FREE(tempValue);
+                    result = 0;
+                }
+            }
+        } else {
+            result = 0;
+        }
+    } else {
+        result = 0;
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    if (type != NULL) {
+        *type = tempType;
+    }
+    if (size != NULL) {
+        *size = tempSize;
+    }
+    if ((value != NULL) && (tempValue != NULL)) {
+        *value = tempValue;
+    }
+    
+    return result;
+}
+
+int setValue(int mode, HKEY section, const unsigned short* key, const unsigned short* name, DWORD type, const byte* data, int size, int expand) {
+    int result = 1;
+    
+    HKEY hkey  = 0;
+    
+    if (RegOpenKeyExW(section, key, 0, KEY_SET_VALUE | mode, &hkey) == ERROR_SUCCESS) {
+        if (!(RegSetValueExW(hkey, name, 0, type, data, size) == ERROR_SUCCESS)) {
+            result = 0;
+        }
+    } else {
+        result = 0;
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    return result;
+}
diff --git a/jnilib/windows/src/WindowsUtils.h b/jnilib/windows/src/WindowsUtils.h
new file mode 100644
index 0000000..4a8868c
--- /dev/null
+++ b/jnilib/windows/src/WindowsUtils.h
@@ -0,0 +1,68 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+#include <windows.h>
+#include <winreg.h>
+#include <winnt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <malloc.h>
+
+#include "../../.common/src/CommonUtils.h"
+
+#ifndef _WindowsUtils_H
+#define _WindowsUtils_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HKEY getHKEY(jint jSection);
+
+int queryValue(int mode, HKEY section, const unsigned short * key, const unsigned short * name, DWORD* type, DWORD* size, byte** value, int expand);
+
+int setValue(int mode, HKEY section, const unsigned short * key, const unsigned short * name, DWORD type, const byte* data, int size, int expand);
+
+LONG getMode(jint jmode);
+#ifdef __cplusplus
+}
+#endif
+#endif // _WindowsUtils_H
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.c b/jnilib/windows/src/jni_WindowsNativeUtils.c
new file mode 100644
index 0000000..762d45c
--- /dev/null
+++ b/jnilib/windows/src/jni_WindowsNativeUtils.c
@@ -0,0 +1,420 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+#include <windows.h>
+#include <lmcons.h>
+#include <shlguid.h>
+#include <shlobj.h>
+
+#include "../../.common/src/CommonUtils.h"
+#include "WindowsUtils.h"
+#include "jni_WindowsNativeUtils.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// Functions
+
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_isCurrentUserAdmin0(JNIEnv* jEnv, jobject jObject) {
+    BOOL result = FALSE;
+    
+    PACL pACL = NULL;
+    PSID psidAdmin = NULL;
+    HANDLE token = NULL;
+    HANDLE duplToken = NULL;
+    PSECURITY_DESCRIPTOR adminDescriptor = NULL;
+    
+    SID_IDENTIFIER_AUTHORITY SystemSidAuthority = SECURITY_NT_AUTHORITY;
+    DWORD aclSize;
+    
+    const DWORD ACCESS_READ  = 1;
+    const DWORD ACCESS_WRITE = 2;
+    
+    GENERIC_MAPPING mapping;
+    
+    PRIVILEGE_SET ps;
+    DWORD status;
+    DWORD structSize = sizeof(PRIVILEGE_SET);
+    
+    // MS KB 118626
+    while (TRUE) {
+        if (!OpenThreadToken(GetCurrentThread(), TOKEN_DUPLICATE | TOKEN_QUERY, TRUE, &token)) {
+            if (GetLastError() != ERROR_NO_TOKEN) {
+                throwException(jEnv, "Native error");
+                break;
+            }
+            
+            if (!OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE | TOKEN_QUERY, &token)) {
+                throwException(jEnv, "Native error");
+                break;
+            }
+        }
+        
+        if (!DuplicateToken(token, SecurityImpersonation, &duplToken)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        
+        if (!AllocateAndInitializeSid(&SystemSidAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &psidAdmin)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        
+        adminDescriptor = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
+        if (adminDescriptor == NULL) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        if (!InitializeSecurityDescriptor(adminDescriptor, SECURITY_DESCRIPTOR_REVISION)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        
+        aclSize = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(psidAdmin) - sizeof(DWORD);
+        
+        pACL = (PACL) LocalAlloc(LPTR, aclSize);
+        if (pACL == NULL) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        if (!InitializeAcl(pACL, aclSize, ACL_REVISION2)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        
+        if (!AddAccessAllowedAce(pACL, ACL_REVISION2, ACCESS_READ | ACCESS_WRITE , psidAdmin)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        if (!SetSecurityDescriptorDacl(adminDescriptor, TRUE, pACL, FALSE)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        
+        SetSecurityDescriptorGroup(adminDescriptor, psidAdmin, FALSE);
+        SetSecurityDescriptorOwner(adminDescriptor, psidAdmin, FALSE);
+        
+        if (!IsValidSecurityDescriptor(adminDescriptor)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        
+        mapping.GenericRead    = ACCESS_READ;
+        mapping.GenericWrite   = ACCESS_WRITE;
+        mapping.GenericExecute = 0;
+        mapping.GenericAll     = ACCESS_READ | ACCESS_WRITE;
+        
+        if (!AccessCheck(adminDescriptor, duplToken, ACCESS_READ, &mapping, &ps, &structSize, &status, &result)) {
+            throwException(jEnv, "Native error");
+            break;
+        }
+        
+        break;
+    }
+    
+    if (pACL) {
+        LocalFree(pACL);
+    }
+    if (adminDescriptor) {
+        LocalFree(adminDescriptor);
+    }
+    if (psidAdmin) {
+        FreeSid(psidAdmin);
+    }
+    if (duplToken) {
+        CloseHandle(duplToken);
+    }
+    if (token) {
+        CloseHandle(token);
+    }
+    
+    return result;
+}
+
+JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_getFreeSpace0(JNIEnv* jEnv, jobject jObject, jstring jPath) {
+    WCHAR*  path = getWideChars(jEnv, jPath);
+    jlong  size = 0;
+    typedef struct int64s { unsigned long Low, High; } int64t;
+    int64t bytes;
+    if (GetDiskFreeSpaceExW(path, (PULARGE_INTEGER) &bytes, NULL, NULL)) {
+        unsigned long h = bytes.High;
+        // workaround of using missing _allmul function
+        // replace multiplication by sum
+        // (2^32 * high + low) = 2^32 + 2^32 + ... (bytes.High times total) + bytes.Low     
+        // can be relatively expensive on big sizes (peta bytes and more)
+        while(h > 0) {
+            h--;
+            size+=4294967296L;
+        }
+        size+= bytes.Low;
+    } else {
+        throwException(jEnv, "Native error");
+    }
+    
+    FREE(path);
+    
+    return size;
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createShortcut0(JNIEnv* jEnv, jobject jObject, jobject jShortcut) {
+    unsigned short *shortcutPath     = getWideStringFromMethod(jEnv, jShortcut, "getPath");
+    unsigned short *targetPath       = getWideStringFromMethod(jEnv, jShortcut, "getTargetPath");
+    unsigned short *description      = getWideStringFromMethod(jEnv, jShortcut, "getDescription");
+    unsigned short *iconPath         = getWideStringFromMethod(jEnv, jShortcut, "getIconPath");
+    jint            iconIndex        = getIntFromMethod       (jEnv, jShortcut, "getIconIndex");
+    unsigned short *workingDirectory = getWideStringFromMethod(jEnv, jShortcut, "getWorkingDirectoryPath");
+    unsigned short *arguments        = getWideStringFromMethod(jEnv, jShortcut, "getArgumentsString");
+    
+    HRESULT     tempResult;
+    IShellLinkW* shell;
+    
+    HRESULT comStart = CoInitialize(NULL);
+    int errorCode = 0;
+    
+    tempResult = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (void **) &shell);
+    
+    if (SUCCEEDED(tempResult)) {
+        IPersistFile *persistFile;
+        // we will save the shell link in persistent storage
+        tempResult = shell->lpVtbl->QueryInterface(shell, &IID_IPersistFile, (void **) &persistFile);
+        
+        if (SUCCEEDED(tempResult)) {
+            tempResult = shell->lpVtbl->SetPath(shell, targetPath);
+            if (!SUCCEEDED(tempResult)) {
+                throwException(jEnv, "Native error (-2)");
+                errorCode = -2;
+            }
+            // make sure description length is less than MAX_PATH
+            if ((errorCode == 0) && (description != NULL)) {
+                if (WCSLEN(description) < MAX_PATH) {
+                    if (!SUCCEEDED(shell->lpVtbl->SetDescription(shell, description))) {
+                        throwException(jEnv, "Native error (-3)");
+                        errorCode = -3;
+                    }
+                } else {
+                    unsigned short *desc = (unsigned short *) MALLOC(sizeof(unsigned short) * MAX_PATH);
+                    ZERO(desc, sizeof(unsigned short) * MAX_PATH);
+                    desc = WCSNCPY(desc, description, MAX_PATH);
+                    if (!SUCCEEDED(shell->lpVtbl->SetDescription(shell, desc))) {
+                        throwException(jEnv, "Native error (-4)");
+                        errorCode = -4;
+                    }
+                    FREE(desc);
+                }
+            }
+            if ((errorCode == 0) && (arguments != NULL)) {
+                if (!SUCCEEDED(shell->lpVtbl->SetArguments(shell, arguments))) {
+                    throwException(jEnv, "Native error (-5)");
+                    errorCode = -5;
+                }
+            }
+            if ((errorCode == 0) && (workingDirectory != NULL)) {
+                if (!SUCCEEDED(shell->lpVtbl->SetWorkingDirectory(shell, workingDirectory))) {
+                    throwException(jEnv, "Native error (-6)");
+                    errorCode = -6;
+                }
+            }
+            if ((errorCode == 0) && (iconPath != NULL)) {
+                if (!SUCCEEDED(shell->lpVtbl->SetIconLocation(shell, iconPath, iconIndex))) {
+                    throwException(jEnv, "Native error (-7)");
+                    errorCode = -7;
+                }
+            }
+            // use normal window.
+            if (errorCode == 0) {
+                if (!SUCCEEDED(shell->lpVtbl->SetShowCmd(shell, SW_NORMAL))) {
+                    throwException(jEnv, "Native error (-8)");
+                    errorCode = -8;
+                }
+            }
+            if (errorCode == 0) {
+                if (mkdirsW(jEnv, shortcutPath)) {
+                    if (!SUCCEEDED(persistFile->lpVtbl->Save(persistFile, shortcutPath, TRUE))) {
+                        throwException(jEnv, "Native error (-9)");
+                        errorCode = -9;
+                    }
+                } else {
+                    throwException(jEnv, "Native error (-10)");
+                    errorCode = -10;
+                }
+            }
+            
+            if (errorCode == 0) {
+                persistFile->lpVtbl->Release(persistFile);
+            }
+        } else {
+            throwException(jEnv, "Native error (-11)");
+            errorCode = -11;
+        }
+        shell->lpVtbl->Release(shell);
+    } else {
+        throwException(jEnv, "Native error (-12)");
+        errorCode = -12;
+    }
+    
+    if (comStart == S_OK) {
+        CoUninitialize();
+    }
+    
+    FREE(shortcutPath);
+    FREE(targetPath);
+    FREE(description);
+    FREE(iconPath);
+    FREE(workingDirectory);
+    FREE(arguments);
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_deleteFileOnReboot0(JNIEnv* jEnv, jobject jObject, jstring jPath) {
+    unsigned short * path = getWideChars(jEnv, jPath);
+    
+    if (!MoveFileExW(path, NULL, MOVEFILE_DELAY_UNTIL_REBOOT)) {
+        throwException(jEnv, "Native error");
+    }
+    
+    FREE(path);
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createProcessWithoutHandles0(JNIEnv* jEnv, jobject jObject, jstring jCommand) {
+    unsigned short * command = getWideChars(jEnv, jCommand);
+    STARTUPINFOW si;
+    PROCESS_INFORMATION pi;
+    
+    ZERO(&si, sizeof(si));
+    si.cb = sizeof(si);
+    ZERO(&pi, sizeof(pi));
+    if(!CreateProcessW(NULL,   // executable name - use command line
+            command,    // command line
+            NULL,   // process security attribute
+            NULL,   // thread security attribute
+            FALSE,   // inherits system handles
+            0,      // no creation flags
+            NULL,   // use parent's environment block
+            NULL,   // use parent's starting directory
+            &si,    // (in) startup information
+            &pi)) {   // (out) process information
+        throwException(jEnv, "Cannot create process.\n");
+    }
+    
+    
+    FREE(command);
+}
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyAssociationChanged0(JNIEnv *jEnv, jobject jObj) {
+    SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyEnvironmentChanged0(JNIEnv *jEnv, jobject jObj) {
+    /* maximum 1 sec timeout for each window in the system */
+    DWORD dwReturnValue = 0;
+    LRESULT result = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) "Environment", SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR) &dwReturnValue);
+    return (result!=0);
+}
+
+
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_checkAccessTokenAccessLevel0(JNIEnv *jEnv, jobject jObj, jstring jPath, jint jLevel) {
+    unsigned short * path = getWideChars(jEnv, jPath);
+    PSECURITY_DESCRIPTOR    pSD;
+    DWORD nLength;
+    
+    PRIVILEGE_SET PrivilegeSet;
+    DWORD PrivSetSize = sizeof (PRIVILEGE_SET);
+    
+    HANDLE hToken;
+    
+    GENERIC_MAPPING GenericMapping;
+    DWORD DesiredAccess = (DWORD) jLevel ;
+    
+    BOOL bAccessGranted;
+    DWORD GrantedAccess;
+    
+    // create memory for storing user's security descriptor
+    GetFileSecurityW(path, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, NULL, 0, &nLength);
+    
+    pSD = (PSECURITY_DESCRIPTOR) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nLength);
+    
+    if (pSD == NULL) {
+        throwException(jEnv, "Unable to allocate memory to store security descriptor.\n");
+        return -1;
+    }
+    // Get the security descriptor
+    if (!GetFileSecurityW(path, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,  pSD, nLength, &nLength)) {
+        throwException(jEnv, "Unable to obtain security descriptor.\n");
+        FREE(path);
+        return (-3);
+    }
+    FREE(path);
+    
+    /* Perform security impersonation of the user and open */
+    /* the resulting thread token. */
+    if (!ImpersonateSelf(SecurityImpersonation)) {
+        throwException(jEnv, "Unable to perform security impersonation.\n");
+        HeapFree(GetProcessHeap(), 0, pSD);
+        return (-4);
+    }
+    
+    if (!OpenThreadToken(GetCurrentThread(), TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken)) {
+        throwException(jEnv, "Unable to get current thread's token.\n");
+        HeapFree(GetProcessHeap(), 0, pSD);
+        return (-5);
+    }
+    RevertToSelf();
+    
+    ZERO(&GenericMapping, sizeof (GENERIC_MAPPING));
+    
+    DesiredAccess = DesiredAccess | STANDARD_RIGHTS_READ;
+    GenericMapping.GenericRead = FILE_GENERIC_READ;
+    
+    if(jLevel & FILE_WRITE_DATA) {
+        GenericMapping.GenericWrite = FILE_GENERIC_WRITE;
+    }
+    
+    MapGenericMask(&DesiredAccess, &GenericMapping);
+    
+    /* Perform access check using the token. */
+    if (!AccessCheck(pSD, hToken, DesiredAccess, &GenericMapping, &PrivilegeSet, &PrivSetSize, &GrantedAccess, &bAccessGranted)) {
+        throwException(jEnv, "Unable to perform access check.\n");
+        CloseHandle(hToken);
+        HeapFree(GetProcessHeap(), 0, pSD);
+        return (-6);
+    }
+    /* Clean up. */
+    HeapFree(GetProcessHeap(), 0, pSD);
+    CloseHandle(hToken);
+    return (bAccessGranted);
+}
+
+
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.h b/jnilib/windows/src/jni_WindowsNativeUtils.h
new file mode 100644
index 0000000..47372b4
--- /dev/null
+++ b/jnilib/windows/src/jni_WindowsNativeUtils.h
@@ -0,0 +1,129 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+/* Header for class org_netbeans_installer_utils_system_WindowsNativeUtils */
+
+#ifndef _Included_org_netbeans_installer_utils_system_WindowsNativeUtils
+#define _Included_org_netbeans_installer_utils_system_WindowsNativeUtils
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#undef org_netbeans_installer_utils_system_WindowsNativeUtils_MIN_UID_INDEX
+#define org_netbeans_installer_utils_system_WindowsNativeUtils_MIN_UID_INDEX 1L
+
+#undef org_netbeans_installer_utils_system_WindowsNativeUtils_MAX_UID_INDEX
+#define org_netbeans_installer_utils_system_WindowsNativeUtils_MAX_UID_INDEX 100L
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    isCurrentUserAdmin0
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_isCurrentUserAdmin0
+  (JNIEnv *, jobject);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    getFreeSpace0
+ * Signature: (Ljava/lang/String;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_getFreeSpace0
+  (JNIEnv *, jobject, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    createShortcut0
+ * Signature: (Lorg/netbeans/installer/utils/system/shortcut/FileShortcut;)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createShortcut0
+  (JNIEnv *, jobject, jobject);
+
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    deleteFileOnReboot0
+ * Signature: (Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_deleteFileOnReboot0
+  (JNIEnv *, jobject, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    createProcessWithoutHandles0
+ * Signature: (Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_createProcessWithoutHandles0
+  (JNIEnv *, jobject, jstring);
+
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    notifyAssociationChanged0
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyAssociationChanged0
+  (JNIEnv *, jobject);
+
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    checkAccessTokenAccessLevel0
+ * Signature: (Ljava/lang/String;I)I
+ */
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_checkAccessTokenAccessLevel0
+  (JNIEnv *, jobject, jstring, jint);
+
+
+/*
+ * Class:     org_netbeans_installer_utils_system_WindowsNativeUtils
+ * Method:    notifyEnvironmentChanged0
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_WindowsNativeUtils_notifyEnvironmentChanged0
+  (JNIEnv *, jobject);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/jnilib/windows/src/jni_WindowsRegistry.c b/jnilib/windows/src/jni_WindowsRegistry.c
new file mode 100644
index 0000000..b586a2f
--- /dev/null
+++ b/jnilib/windows/src/jni_WindowsRegistry.c
@@ -0,0 +1,652 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+#include <windows.h>
+#include <winreg.h>
+#include <winnt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <malloc.h>
+
+#include "../../.common/src/CommonUtils.h"
+#include "WindowsUtils.h"
+#include "jni_WindowsRegistry.h"
+
+////////////////////////////////////////////////////////////////////////////////
+// Globals
+
+// maximum length of a registry value
+const DWORD MAX_LEN_VALUE_NAME = 16383;
+
+////////////////////////////////////////////////////////////////////////////////
+// Functions
+
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_checkKeyAccess0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jint jLevel) {
+    HKEY  hkey = 0;
+    unsigned short * key = getWideChars(jEnv, jKey);
+    
+    jboolean result = FALSE;
+    REGSAM access = (jLevel==0) ? KEY_READ : KEY_ALL_ACCESS;
+    result = (RegOpenKeyExW(getHKEY(jSection), key, 0, access | getMode(jMode), &hkey) == ERROR_SUCCESS);
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    
+    return result;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_valueExists0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
+    HKEY  hkey  = 0;
+    unsigned short * key   = getWideChars(jEnv, jKey);
+    unsigned short * value = getWideChars(jEnv, jName);
+    jboolean result = FALSE;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        result = (RegQueryValueExW(hkey, value, NULL, NULL, NULL, NULL) == ERROR_SUCCESS);
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    FREE(key);
+    FREE(value);
+    
+    return result;
+}
+
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_keyEmpty0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
+    HKEY  hkey = 0;
+    unsigned short* key = getWideChars(jEnv, jKey);
+    
+    DWORD subkeys = 1;
+    DWORD values  = 1;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &subkeys, NULL, NULL, &values, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
+            throwException(jEnv, "Cannot read key data");
+        }
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    
+    return (values + subkeys == 0);
+}
+
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countSubKeys0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
+    HKEY  hkey = 0;
+    unsigned short* key = getWideChars(jEnv, jKey);
+    
+    DWORD count = 0;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        if(RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
+            throwException(jEnv, "Cannot read key data");
+        }
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    
+    return count;
+}
+
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countValues0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
+    HKEY  hkey = 0;
+    unsigned short* key = getWideChars(jEnv, jKey);
+    
+    DWORD count = 0;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, &count, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
+            throwException(jEnv, "Cannot read key data");
+        }
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    
+    return count;
+}
+
+JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getSubkeyNames0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
+    HKEY  hkey   = 0;
+    unsigned short* key    = getWideChars(jEnv, jKey);
+    DWORD number = 0;
+    int   err    = 0;
+    int   index  = 0 ;
+    
+    unsigned short* buffer = (unsigned short*) MALLOC(sizeof(char) * MAX_LEN_VALUE_NAME);
+    
+    jobjectArray result = NULL;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_READ | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &number, NULL, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
+            jclass stringClazz = (*jEnv)->FindClass(jEnv, "java/lang/String");
+            result = (*jEnv)->NewObjectArray(jEnv, number, stringClazz, NULL);
+            
+            do {
+                DWORD size = MAX_LEN_VALUE_NAME;
+                buffer[0]  = 0;
+                
+                err = RegEnumKeyExW(hkey, index, buffer, &size, NULL, NULL, NULL, NULL);
+                if (err == ERROR_SUCCESS) {
+                    (*jEnv)->SetObjectArrayElement(jEnv, result, index, getStringW(jEnv, buffer));
+                } else {
+                    if (err != ERROR_NO_MORE_ITEMS) {
+                        throwException(jEnv, "Cannot get key names");
+                    }
+                }
+                
+                index++;
+            } while (err == ERROR_SUCCESS);
+        } else {
+            throwException(jEnv, "Cannot read key data");
+        }
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    FREE(buffer);
+    
+    return result;
+}
+
+JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueNames0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey) {
+    HKEY  hkey         = 0;
+    unsigned short* key          = getWideChars(jEnv, jKey);
+    DWORD valuesCount  = 0;
+    int   err          = 0;
+    int   index        = 0;
+    
+    unsigned short* buffer = (unsigned short*) MALLOC(sizeof(char) * MAX_LEN_VALUE_NAME);
+    
+    jobjectArray result = NULL;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, &valuesCount, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
+            jclass stringClazz = (*jEnv)->FindClass(jEnv, "java/lang/String");
+            result = (*jEnv)->NewObjectArray(jEnv, valuesCount, stringClazz, NULL);
+            
+            do {
+                DWORD size = MAX_LEN_VALUE_NAME;
+                buffer[0]  = 0;
+                
+                err = RegEnumValueW(hkey, index, buffer, &size, NULL, NULL, NULL, NULL);
+                if (err == ERROR_SUCCESS) {
+                    (*jEnv)->SetObjectArrayElement(jEnv, result, index, getStringW(jEnv, buffer));
+                } else {
+                    if (err != ERROR_NO_MORE_ITEMS) {
+                        throwException(jEnv, "Cannot get value names");
+                    }
+                }
+                
+                index++;
+            } while (err == ERROR_SUCCESS);
+        } else {
+            throwException(jEnv, "Cannot read key data");
+        }
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    FREE(buffer);
+    
+    return result;
+}
+
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueType0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
+    HKEY  hkey   =0;
+    unsigned short* key   = getWideChars(jEnv, jKey);
+    unsigned short* value = getWideChars(jEnv, jName);
+    
+    DWORD type = REG_NONE;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        if (RegQueryValueExW(hkey, value, NULL, &type, NULL, NULL) != ERROR_SUCCESS) {
+            throwException(jEnv, "Cannot read value");
+        }
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    FREE(value);
+    
+    return type;
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_createKey0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jParent, jstring jChild) {
+    HKEY  hkey   = 0;
+    HKEY  newKey = 0;
+    unsigned short* parent = getWideChars(jEnv, jParent);
+    unsigned short* child  = getWideChars(jEnv, jChild);
+    
+    if (RegOpenKeyExW(getHKEY(jSection), parent, 0, KEY_CREATE_SUB_KEY | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        LONG result = RegCreateKeyExW(hkey, child, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE | getMode(jMode), NULL, &newKey, NULL);
+        if (result == ERROR_SUCCESS) {
+            if (newKey != 0) {
+                RegCloseKey(newKey);
+            }
+        } else if (result == ERROR_ACCESS_DENIED) {
+            throwException(jEnv, "Could not create a new key (access denied)");
+        } else {
+            throwException(jEnv, "Could not create a new key");
+        }
+    } else {
+        throwException(jEnv, "Could not open the parent key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(parent);
+    FREE(child);
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteKey0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jParent, jstring jChild) {
+    HKEY  hkey       = 0;
+    unsigned short* jParentS = getWideChars(jEnv, jParent);
+    unsigned short* jChildS  = getWideChars(jEnv, jChild);
+    
+    
+    if (RegOpenKeyExW(getHKEY(jSection), jParentS, 0, KEY_READ | KEY_WRITE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+	LONG mode = getMode(jMode);
+	if(mode==0) {
+            if (RegDeleteKeyW(hkey, jChildS) != ERROR_SUCCESS) {
+                throwException(jEnv, "Could not delete key");
+	    }
+        } else {
+             typedef LONG (WINAPI *LPFN_REGDELETEKEYEXW) (HKEY, LPCWSTR, REGSAM, DWORD);
+             LPFN_REGDELETEKEYEXW regDeleteKeyExW;
+             HMODULE hModule = GetModuleHandle(TEXT("advapi32.dll"));
+             if(hModule == NULL) {
+                 hModule = LoadLibraryA("advapi32.dll");
+             }
+             regDeleteKeyExW = (LPFN_REGDELETEKEYEXW) GetProcAddress(hModule,"RegDeleteKeyExW");
+             if (NULL != regDeleteKeyExW) {
+                 if (regDeleteKeyExW(hkey, jChildS, mode, 0) != ERROR_SUCCESS) {
+     		    throwException(jEnv, "Could not delete key");
+                 }
+             } else {
+                    throwException(jEnv, "Cannot load function RegDeleteKeyExW");
+             }
+        }
+    } else {
+        throwException(jEnv, "Could not open the parent key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(jParentS);
+    FREE(jChildS);
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
+    HKEY  hkey   = 0;
+    unsigned short* key   = getWideChars(jEnv, jKey);
+    unsigned short* value = getWideChars(jEnv, jName);
+    
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_SET_VALUE | getMode(jMode) , &hkey) == ERROR_SUCCESS) {
+        if (RegDeleteValueW(hkey, value) != ERROR_SUCCESS) {
+            throwException(jEnv, "Cannot delete value");
+        }
+    } else {
+        throwException(jEnv, "Canont open key");
+    }
+    
+    if(hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    FREE(value);
+}
+
+JNIEXPORT jstring JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jboolean jExpand) {
+    unsigned short*   key    = getWideChars(jEnv, jKey);
+    unsigned short*   name   = getWideChars(jEnv, jName);
+    DWORD   type   = REG_NONE;
+    byte*   value  = NULL;
+    
+    jstring result = NULL;
+    
+    if (queryValue(getMode(jMode), getHKEY(jSection), key, name, &type, NULL, &value, jExpand)) {
+        if (type == REG_SZ || type == REG_EXPAND_SZ) {
+            result = getStringW(jEnv, (unsigned short*) value);
+        } else {
+            throwException(jEnv, "Value has wrong type");
+        }
+    } else {
+        throwException(jEnv, "Cannot read value");
+    }
+    
+    FREE(key);
+    FREE(name);
+    FREE(value);
+    
+    return result;
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jstring jValue, jboolean jExpand) {
+    unsigned short* key   = getWideChars(jEnv, jKey);
+    unsigned short* name  = getWideChars(jEnv, jName);
+    unsigned short* value = getWideChars(jEnv, jValue);
+    
+    if (!setValue(getMode(jMode), getHKEY(jSection), key, name, jExpand ? REG_EXPAND_SZ : REG_SZ, (byte*) value, ((int) WCSLEN(value)) * sizeof(unsigned short), 0)) {
+        throwException(jEnv, "Could not set value");
+    }
+    
+    FREE(key);
+    FREE(name);
+    FREE(value);
+}
+
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_get32BitValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
+    HKEY  hkey   = 0;
+    unsigned short* key   = getWideChars(jEnv, jKey);
+    unsigned short* value = getWideChars(jEnv, jName);
+    
+    jint result = -1;
+    if(RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        DWORD dwType    = 0;
+        DWORD dwValue   = 0;
+        DWORD dwBufSize = sizeof(dwValue);
+        
+        if (RegQueryValueExW(hkey, value, NULL, &dwType, (LPBYTE) &dwValue, &dwBufSize) == ERROR_SUCCESS) {
+            if ((dwType == REG_DWORD) || (dwType == REG_DWORD_BIG_ENDIAN)) {
+                result = dwValue;
+            } else {
+                throwException(jEnv, "Value is of wrong type");
+            }
+        } else {
+            throwException(jEnv, "Cannot read key data");
+        }
+    } else {
+        throwException(jEnv, "Could not open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    FREE(value);
+    
+    return result;
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_set32BitValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jint jValue) {
+    unsigned short*  key       = getWideChars(jEnv, jKey);
+    unsigned short*  name      = getWideChars(jEnv, jName);
+    DWORD  dword     = (DWORD) jValue;
+    LPBYTE byteValue = (LPBYTE) &dword;
+    
+    if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_DWORD, byteValue, sizeof(name), 0)) {
+        throwException(jEnv, "Cannot set value");
+    }
+    
+    FREE(key);
+    FREE(name);
+}
+
+JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getMultiStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
+    HKEY  hkey   = 0;
+    unsigned short* key   = getWideChars(jEnv, jKey);
+    unsigned short* value = getWideChars(jEnv, jName);
+    
+    int	i, start, count, cnt;
+    LONG regErr = 0;
+    unsigned short* data = 0;
+    jstring string;
+    jclass strClass;
+    DWORD dwType;
+    DWORD size = 0;
+    
+    jarray result = 0;
+    if(RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        if (RegQueryValueExW(hkey, value, NULL, &dwType, NULL, &size) == ERROR_SUCCESS) {
+            if (dwType == REG_MULTI_SZ) {
+                data = (unsigned short*) LocalAlloc(LPTR, size + 8);
+                
+                if (data != NULL) {
+                    if (RegQueryValueExW(hkey, value, NULL, &dwType, (byte*) data, &size) == ERROR_SUCCESS) {
+                        for (count = 0, i = 0; i < (int) size; i++) {
+                            if (data[i] == '\0') { // \0 - end of a single string
+                                count++;
+                                if (data[i + 1] == '\0') { // two \0 's in a row - end of all strings
+                                    break;
+                                }
+                            }
+                        }
+                        
+                        strClass = (*jEnv)->FindClass(jEnv, "java/lang/String");
+                        if (strClass != NULL) {
+                            result = (*jEnv)->NewObjectArray(jEnv, (jsize) count, strClass, NULL);
+                            if (result != NULL) {
+                                for (cnt = 0, start = 0, i = 0; (i < (int) size) && (cnt < count); i++) {
+                                    if (data[i] == '\0') {
+                                        string = getStringWithLengthW(jEnv, &data[start], i - start);
+                                        
+                                        if (string != NULL) {
+                                            (*jEnv)->SetObjectArrayElement(jEnv, (jobjectArray) result, (jsize) cnt++, string);
+                                            
+                                            start = i + 1;
+                                            if (data[start] == '\0') {
+                                                break;
+                                            }
+                                        } else {
+                                            throwException(jEnv, "Cannot create an array element");
+                                            break;
+                                        }
+                                    }
+                                }
+                            } else {
+                                throwException(jEnv, "Cannot create resulting array");
+                            }
+                        } else {
+                            throwException(jEnv, "Cannot find java.lang.String");
+                        }
+                    } else {
+                        throwException(jEnv, "Cannot read value data");
+                    }
+                    FREE(data);
+                } else {
+                    throwException(jEnv, "Cannot allocate memory for value");
+                }
+            } else {
+                throwException(jEnv, "Value is of wrong type");
+            }
+        } else {
+            throwException(jEnv, "Cannot read key data");
+        }
+    } else {
+        throwException(jEnv, "Cannot open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    FREE(value);
+    
+    return (jobjectArray) result;
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setMultiStringValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jobjectArray jValue) {
+    unsigned short* key    = getWideChars(jEnv, jKey);
+    unsigned short* name   = getWideChars(jEnv, jName);
+    DWORD size   = 0;
+    BYTE* data   = getByteFromMultiString(jEnv, jValue, &size);
+    
+    if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_MULTI_SZ, data, size, 0)) {
+        throwException(jEnv, "Cannot set value");
+    }
+    
+    FREE(key);
+    FREE(name);
+    FREE(data);
+}
+
+JNIEXPORT jbyteArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getBinaryValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName) {
+    HKEY  hkey   = 0;
+    unsigned short* key   = getWideChars(jEnv, jKey);
+    unsigned short* value = getWideChars(jEnv, jName);
+    
+    jbyteArray result = NULL;
+    if (RegOpenKeyExW(getHKEY(jSection), key, 0, KEY_QUERY_VALUE | getMode(jMode), &hkey) == ERROR_SUCCESS) {
+        DWORD dwType  = 0;
+        DWORD dwValue = 0;
+        DWORD size    = 0;
+        BYTE* data    = NULL;
+        
+        if (RegQueryValueExW(hkey, value, NULL, &dwType, NULL, &size) == ERROR_SUCCESS) {
+            if (dwType == REG_BINARY || dwType == REG_NONE) {
+                data = (BYTE*) LocalAlloc(LPTR, size + 8);
+                if (RegQueryValueExW(hkey, value, NULL, &dwType, (BYTE*) data, &size) == ERROR_SUCCESS) {
+                    if (data != NULL) {
+                        result = (*jEnv)->NewByteArray(jEnv, (jsize) size);
+                        (*jEnv)->SetByteArrayRegion(jEnv, result, 0, (jsize) size, (jbyte*) data);
+                    }
+                } else {
+                    throwException(jEnv, "Could not read key data");
+                }
+                FREE(data);
+            } else {
+                throwException(jEnv, "Value is of wrong type");
+            }
+        } else {
+            throwException(jEnv, "Could not read key data");
+        }
+    } else {
+        throwException(jEnv, "Could not open key");
+    }
+    
+    if (hkey != 0) {
+        RegCloseKey(hkey);
+    }
+    
+    FREE(key);
+    FREE(value);
+    
+    return result;
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setBinaryValue0(JNIEnv *jEnv, jobject jObject, jint jMode, jint jSection, jstring jKey, jstring jName, jbyteArray jValue) {
+    unsigned short*  key     = getWideChars(jEnv, jKey);
+    unsigned short*  name    = getWideChars(jEnv, jName);
+    BYTE*  data    = (BYTE*) (*jEnv)->GetByteArrayElements(jEnv, jValue, 0);
+    DWORD  length  = (*jEnv)->GetArrayLength(jEnv, jValue);
+    
+    if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_BINARY, data, length, 0)) {
+        throwException(jEnv, "Cannot set value");
+    }
+    
+    FREE(key);
+    FREE(name);
+    if (data != NULL) {
+        (*jEnv)->ReleaseByteArrayElements(jEnv, jValue, (jbyte*) data, JNI_ABORT);
+    }
+}
+
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setNoneValue0(JNIEnv *jEnv, jobject jobj, jint jMode, jint jSection, jstring jKey, jstring jName, jbyteArray jValue) {
+    unsigned short*  key     = getWideChars(jEnv, jKey);
+    unsigned short*  name    = getWideChars(jEnv, jName);
+    BYTE*  data    = (BYTE*) (*jEnv)->GetByteArrayElements(jEnv, jValue, 0);
+    DWORD  length  = (*jEnv)->GetArrayLength(jEnv, jValue);
+    
+    if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_NONE, data, length, 0)) {
+        throwException(jEnv, "Cannot set value");
+    }
+    
+    FREE(key);
+    FREE(name);
+    if (data != NULL) {
+        (*jEnv)->ReleaseByteArrayElements(jEnv, jValue, (jbyte*) data, JNI_ABORT);
+    }
+}
+
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_IsWow64Process0(JNIEnv *jEnv, jobject jObject) {
+    typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+    LPFN_ISWOW64PROCESS fnIsWow64Process;
+    BOOL IsWow64 = FALSE;
+
+    fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(TEXT("kernel32")),"IsWow64Process");
+  
+    if (NULL != fnIsWow64Process)
+    {
+        if (!fnIsWow64Process(GetCurrentProcess(),&IsWow64))
+        {
+        }
+    }
+    return IsWow64;
+}
diff --git a/jnilib/windows/src/jni_WindowsRegistry.h b/jnilib/windows/src/jni_WindowsRegistry.h
new file mode 100644
index 0000000..b80248b
--- /dev/null
+++ b/jnilib/windows/src/jni_WindowsRegistry.h
@@ -0,0 +1,286 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <jni.h>
+/* Header for class org_netbeans_installer_utils_system_windows_WindowsRegistry */
+
+#ifndef _Included_org_netbeans_installer_utils_system_windows_WindowsRegistry
+#define _Included_org_netbeans_installer_utils_system_windows_WindowsRegistry
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CLASSES_ROOT
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CLASSES_ROOT 0L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_USER
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_USER 1L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_LOCAL_MACHINE
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_LOCAL_MACHINE 2L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_USERS
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_USERS 3L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_CONFIG
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_CURRENT_CONFIG 4L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_DYN_DATA
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_DYN_DATA 5L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_DATA
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_DATA 6L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_NLSTEXT
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_NLSTEXT 7L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_TEXT
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKEY_PERFORMANCE_TEXT 8L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCR
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCR 0L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCU
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKCU 1L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_HKLM
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_HKLM 2L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_NONE
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_NONE 0L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_SZ
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_SZ 1L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_EXPAND_SZ
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_EXPAND_SZ 2L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_BINARY
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_BINARY 3L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_LITTLE_ENDIAN
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_LITTLE_ENDIAN 4L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD 4L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_BIG_ENDIAN
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_DWORD_BIG_ENDIAN 5L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_LINK
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_LINK 6L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_MULTI_SZ
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_MULTI_SZ 7L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_LIST
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_LIST 8L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_FULL_RESOURCE_DESCRIPTOR
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_FULL_RESOURCE_DESCRIPTOR 9L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_REQUIREMENTS_LIST
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_RESOURCE_REQUIREMENTS_LIST 10L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD_LITTLE_ENDIAN
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD_LITTLE_ENDIAN 11L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_REG_QWORD 11L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_DEFAULT
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_DEFAULT 0L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_32BIT
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_32BIT 1L
+#undef org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_64BIT
+#define org_netbeans_installer_utils_system_windows_WindowsRegistry_MODE_64BIT 2L
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    checkKeyAccess0
+ * Signature: (IILjava/lang/String;I;)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_checkKeyAccess0
+  (JNIEnv *, jobject, jint, jint, jstring, jint);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    valueExists0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_valueExists0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    keyEmpty0
+ * Signature: (IILjava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_keyEmpty0
+  (JNIEnv *, jobject, jint, jint, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    countSubKeys0
+ * Signature: (IILjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countSubKeys0
+  (JNIEnv *, jobject, jint, jint, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    countValues0
+ * Signature: (IILjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_countValues0
+  (JNIEnv *, jobject, jint, jint, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    getSubkeyNames0
+ * Signature: (IILjava/lang/String;)[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getSubkeyNames0
+  (JNIEnv *, jobject, jint, jint, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    getValueNames0
+ * Signature: (IILjava/lang/String;)[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueNames0
+  (JNIEnv *, jobject, jint, jint, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    getValueType0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getValueType0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    createKey0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_createKey0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    deleteKey0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteKey0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    deleteValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_deleteValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    getStringValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getStringValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring, jboolean);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    setStringValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setStringValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring, jstring, jboolean);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    get32BitValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_get32BitValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    set32BitValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;I)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_set32BitValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring, jint);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    getMultiStringValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getMultiStringValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    setMultiStringValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setMultiStringValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring, jobjectArray);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    getBinaryValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_getBinaryValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    setBinaryValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;[B)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setBinaryValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring, jbyteArray);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    setNoneValue0
+ * Signature: (IILjava/lang/String;Ljava/lang/String;[B)V
+ */
+JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_setNoneValue0
+  (JNIEnv *, jobject, jint, jint, jstring, jstring, jbyteArray);
+
+/*
+ * Class:     org_netbeans_installer_utils_system_windows_WindowsRegistry
+ * Method:    IsWow64Process0
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsRegistry_IsWow64Process0
+  (JNIEnv *, jobject);
+
+
+#ifndef KEY_WOW64_32KEY
+#define KEY_WOW64_32KEY 0x0200
+#endif
+#ifndef KEY_WOW64_64KEY
+#define KEY_WOW64_64KEY 0x0100
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/jnilib/windows/vcproject/NBI JNI Library.ncb b/jnilib/windows/vcproject/NBI JNI Library.ncb
new file mode 100644
index 0000000..9057eba
--- /dev/null
+++ b/jnilib/windows/vcproject/NBI JNI Library.ncb	
@@ -0,0 +1 @@
+Microsoft C/C++ MSF 7.00
diff --git a/jnilib/windows/vcproject/NBI JNI Library.sln b/jnilib/windows/vcproject/NBI JNI Library.sln
new file mode 100644
index 0000000..4410e6f
--- /dev/null
+++ b/jnilib/windows/vcproject/NBI JNI Library.sln	
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NBI JNI Library", "NBI JNI Library.vcproj", "{AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Default-32bit|Windows = Default-32bit|Windows
+		Default-64bit|Windows = Default-64bit|Windows
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-32bit|Windows.ActiveCfg = Default-32bit|Win32
+		{AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-32bit|Windows.Build.0 = Default-32bit|Win32
+		{AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-64bit|Windows.ActiveCfg = Default-32bit|Win32
+		{AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}.Default-64bit|Windows.Build.0 = Default-32bit|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/jnilib/windows/vcproject/NBI JNI Library.suo b/jnilib/windows/vcproject/NBI JNI Library.suo
new file mode 100644
index 0000000..8a45057
Binary files /dev/null and b/jnilib/windows/vcproject/NBI JNI Library.suo differ
diff --git a/jnilib/windows/vcproject/NBI JNI Library.vcproj b/jnilib/windows/vcproject/NBI JNI Library.vcproj
new file mode 100644
index 0000000..4cbd1b7
--- /dev/null
+++ b/jnilib/windows/vcproject/NBI JNI Library.vcproj	
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="NBI JNI Library"
+	ProjectGUID="{AF9FBB45-6887-41CE-8DC2-915C5FB2AD45}"
+	RootNamespace="NBI JNI Library"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Default-32bit|Win32"
+			OutputDirectory="Default-32bit"
+			IntermediateDirectory="Default-32bit"
+			ConfigurationType="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				UseUnicodeResponseFiles="true"
+				Optimization="1"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include&quot;;&quot;C:\Program Files\Java\jdk1.5.0_11\include&quot;;&quot;C:\Program Files\Java\jdk1.5.0_11\include\win32&quot;"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;NBIJNILIBRARY_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_STATIC_CPPLIB;_LITTLE_ENDIAN"
+				MinimalRebuild="false"
+				ExceptionHandling="0"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				WarnAsError="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CallingConvention="0"
+				CompileAs="1"
+				ShowIncludes="false"
+				OmitDefaultLibName="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkLibraryDependencies="false"
+				UseLibraryDependencyInputs="false"
+				ShowProgress="1"
+				OutputFile="..\dist\windows-x86.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib&quot;"
+				GenerateManifest="false"
+				IgnoreEmbeddedIDL="true"
+				GenerateDebugInformation="false"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Default-64bit|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				UseUnicodeResponseFiles="true"
+				Optimization="1"
+				FavorSizeOrSpeed="2"
+				AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include&quot;;&quot;C:\Program Files\Java\jdk1.5.0_11\include&quot;;&quot;C:\Program Files\Java\jdk1.5.0_11\include\win32&quot;"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;NBIJNILIBRARY_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_STATIC_CPPLIB;_LITTLE_ENDIAN"
+				MinimalRebuild="false"
+				ExceptionHandling="0"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="0"
+				DisableLanguageExtensions="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				WarnAsError="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="0"
+				CallingConvention="0"
+				CompileAs="1"
+				ShowIncludes="false"
+				OmitDefaultLibName="false"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkLibraryDependencies="false"
+				UseLibraryDependencyInputs="false"
+				ShowProgress="0"
+				OutputFile="..\dist\windows-x64.dll"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib&quot;"
+				GenerateManifest="false"
+				IgnoreEmbeddedIDL="true"
+				GenerateDebugInformation="false"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\.common\src\CommonUtils.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\jni_WindowsNativeUtils.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\jni_WindowsRegistry.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\WindowsUtils.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\.common\src\CommonUtils.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\jni_WindowsNativeUtils.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\jni_WindowsRegistry.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\WindowsUtils.c"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/jnilib/windows/vcproject/NBI JNI Library.vcproj.user b/jnilib/windows/vcproject/NBI JNI Library.vcproj.user
new file mode 100644
index 0000000..a5ca4f9
--- /dev/null
+++ b/jnilib/windows/vcproject/NBI JNI Library.vcproj.user	
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><VisualStudioUserFile ProjectType="Visual C++" Version="8.00" ShowAllFiles="true"></VisualStudioUserFile>
\ No newline at end of file
diff --git a/jnilib/windows/vcproject/vc80.idb b/jnilib/windows/vcproject/vc80.idb
new file mode 100644
index 0000000..3169052
Binary files /dev/null and b/jnilib/windows/vcproject/vc80.idb differ
diff --git a/launcher/unix/i18n/launcher.properties b/launcher/unix/i18n/launcher.properties
new file mode 100644
index 0000000..3fbc316
--- /dev/null
+++ b/launcher/unix/i18n/launcher.properties
@@ -0,0 +1,71 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+nlu.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 8 is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again.\nYou can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads
+nlu.jvm.usererror=Java Runtime Environment (JRE) was not found at the specified location {0}
+nlu.jvm.uncompatible=Unsupported JVM version at {0}.\nTry to specify another JVM location using parameter {1}
+nlu.freespace=There is not enough free disk space to extract installation data\n{0} MB of free disk space is required in a temporary folder.\nClean up the disk space and run installer again. You can specify a temporary folder with sufficient disk space using {1} installer argument
+nlu.integrity=\nInstaller file {0} seems to be corrupted
+nlu.missing.external.resource=Can`t run NetBeans Installer.\nAn external file with necessary data is required but missing:\n{0}
+nlu.cannot.create.tmpdir=Cannot create temporary directory {0}
+nlu.cannot.extract.bundled.jvm=Cannot prepare bundled JVM to run the installer.\nMost probably the bundled JVM is not compatible with the current platform.\nSee FAQ at http://wiki.netbeans.org/FaqUnableToPrepareBundledJdk for more information.
+nlu.cannot.unpack.jvm.file=Cannot unpack file {0}
+nlu.error.verify.bundled.jvm=Cannot verify bundled JVM, try to search JVM on the system
+
+nlu.running=Running the installer wizard...
+nlu.starting=Configuring the installer...
+nlu.extracting=Extracting installation data...
+nlu.prepare.jvm=Preparing bundled JVM ...
+nlu.jvm.search=Searching for JVM on the system...
+
+nlu.msg.usage=\nUsage:
+nlu.arg.javahome=\t{0}\t<dir>\tUsing java from <dir> for running application
+nlu.arg.verbose=\t{0}\t\tUse verbose output
+nlu.arg.output=\t{0}\t<out>\tRedirect all output to file <out>
+nlu.arg.disable.space.check=\t{0}\t\tDisable free space check
+nlu.arg.extract=\t{0}\t[dir]\tExtract all bundled data to <dir>.\n\t\t\t\tIf <dir> is not specified then extract to the current directory
+nlu.arg.tempdir=\t{0}\t<dir>\tUse <dir> for extracting temporary data
+nlu.arg.cpa=\t{0} <cp>\tAppend classpath with <cp>
+nlu.arg.cpp=\t{0} <cp>\tPrepend classpath with <cp>
+nlu.arg.locale=\t{0}\t<locale>\tOverride default locale with specified <locale>
+nlu.arg.silent=\t{0}\t\tRun installer silently
+nlu.arg.help=\t{0}\t\tShow this help
+
+
+nlu.java.application.name.macosx=NetBeans IDE Installer
diff --git a/launcher/unix/src/launcher.sh b/launcher/unix/src/launcher.sh
new file mode 100644
index 0000000..0db024b
--- /dev/null
+++ b/launcher/unix/src/launcher.sh
@@ -0,0 +1,1685 @@
+#!/bin/sh
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2013 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+ARG_JAVAHOME="--javahome"
+ARG_VERBOSE="--verbose"
+ARG_OUTPUT="--output"
+ARG_EXTRACT="--extract"
+ARG_JAVA_ARG_PREFIX="-J"
+ARG_TEMPDIR="--tempdir"
+ARG_CLASSPATHA="--classpath-append"
+ARG_CLASSPATHP="--classpath-prepend"
+ARG_HELP="--help"
+ARG_SILENT="--silent"
+ARG_NOSPACECHECK="--nospacecheck"
+ARG_LOCALE="--locale"
+
+USE_DEBUG_OUTPUT=0
+PERFORM_FREE_SPACE_CHECK=1
+SILENT_MODE=0
+EXTRACT_ONLY=0
+SHOW_HELP_ONLY=0
+LOCAL_OVERRIDDEN=0
+APPEND_CP=
+PREPEND_CP=
+LAUNCHER_APP_ARGUMENTS=
+LAUNCHER_JVM_ARGUMENTS=
+ERROR_OK=0
+ERROR_TEMP_DIRECTORY=2
+ERROR_TEST_JVM_FILE=3
+ERROR_JVM_NOT_FOUND=4
+ERROR_JVM_UNCOMPATIBLE=5
+ERROR_EXTRACT_ONLY=6
+ERROR_INPUTOUPUT=7
+ERROR_FREESPACE=8
+ERROR_INTEGRITY=9
+ERROR_MISSING_RESOURCES=10
+ERROR_JVM_EXTRACTION=11
+ERROR_JVM_UNPACKING=12
+ERROR_VERIFY_BUNDLED_JVM=13
+
+VERIFY_OK=1
+VERIFY_NOJAVA=2
+VERIFY_UNCOMPATIBLE=3
+
+MSG_ERROR_JVM_NOT_FOUND="nlu.jvm.notfoundmessage"
+MSG_ERROR_USER_ERROR="nlu.jvm.usererror"
+MSG_ERROR_JVM_UNCOMPATIBLE="nlu.jvm.uncompatible"
+MSG_ERROR_INTEGRITY="nlu.integrity"
+MSG_ERROR_FREESPACE="nlu.freespace"
+MSG_ERROP_MISSING_RESOURCE="nlu.missing.external.resource"
+MSG_ERROR_TMPDIR="nlu.cannot.create.tmpdir"
+
+MSG_ERROR_EXTRACT_JVM="nlu.cannot.extract.bundled.jvm"
+MSG_ERROR_UNPACK_JVM_FILE="nlu.cannot.unpack.jvm.file"
+MSG_ERROR_VERIFY_BUNDLED_JVM="nlu.error.verify.bundled.jvm"
+
+MSG_RUNNING="nlu.running"
+MSG_STARTING="nlu.starting"
+MSG_EXTRACTING="nlu.extracting"
+MSG_PREPARE_JVM="nlu.prepare.jvm"
+MSG_JVM_SEARCH="nlu.jvm.search"
+MSG_ARG_JAVAHOME="nlu.arg.javahome"
+MSG_ARG_VERBOSE="nlu.arg.verbose"
+MSG_ARG_OUTPUT="nlu.arg.output"
+MSG_ARG_EXTRACT="nlu.arg.extract"
+MSG_ARG_TEMPDIR="nlu.arg.tempdir"
+MSG_ARG_CPA="nlu.arg.cpa"
+MSG_ARG_CPP="nlu.arg.cpp"
+MSG_ARG_DISABLE_FREE_SPACE_CHECK="nlu.arg.disable.space.check"
+MSG_ARG_LOCALE="nlu.arg.locale"
+MSG_ARG_SILENT="nlu.arg.silent"
+MSG_ARG_HELP="nlu.arg.help"
+MSG_USAGE="nlu.msg.usage"
+
+isSymlink=
+
+entryPoint() {
+        initSymlinkArgument        
+	CURRENT_DIRECTORY=`pwd`
+	LAUNCHER_NAME=`echo $0`
+	parseCommandLineArguments "$@"
+	initializeVariables            
+	setLauncherLocale	
+	debugLauncherArguments "$@"
+	if [ 1 -eq $SHOW_HELP_ONLY ] ; then
+		showHelp
+	fi
+	
+        message "$MSG_STARTING"
+        createTempDirectory
+	checkFreeSpace "$TOTAL_BUNDLED_FILES_SIZE" "$LAUNCHER_EXTRACT_DIR"	
+
+        extractJVMData
+	if [ 0 -eq $EXTRACT_ONLY ] ; then 
+            searchJava
+	fi
+
+	extractBundledData
+	verifyIntegrity
+
+	if [ 0 -eq $EXTRACT_ONLY ] ; then 
+	    executeMainClass
+	else 
+	    exitProgram $ERROR_OK
+	fi
+}
+
+initSymlinkArgument() {
+        testSymlinkErr=`test -L / 2>&1 > /dev/null`
+        if [ -z "$testSymlinkErr" ] ; then
+            isSymlink=-L
+        else
+            isSymlink=-h
+        fi
+}
+
+debugLauncherArguments() {
+	debug "Launcher Command : $0"
+	argCounter=1
+        while [ $# != 0 ] ; do
+		debug "... argument [$argCounter] = $1"
+		argCounter=`expr "$argCounter" + 1`
+		shift
+	done
+}
+isLauncherCommandArgument() {
+	case "$1" in
+	    $ARG_VERBOSE | $ARG_NOSPACECHECK | $ARG_OUTPUT | $ARG_HELP | $ARG_JAVAHOME | $ARG_TEMPDIR | $ARG_EXTRACT | $ARG_SILENT | $ARG_LOCALE | $ARG_CLASSPATHP | $ARG_CLASSPATHA)
+	    	echo 1
+		;;
+	    *)
+		echo 0
+		;;
+	esac
+}
+
+parseCommandLineArguments() {
+	while [ $# != 0 ]
+	do
+		case "$1" in
+		$ARG_VERBOSE)
+                        USE_DEBUG_OUTPUT=1;;
+		$ARG_NOSPACECHECK)
+                        PERFORM_FREE_SPACE_CHECK=0
+                        parseJvmAppArgument "$1"
+                        ;;
+                $ARG_OUTPUT)
+			if [ -n "$2" ] ; then
+                        	OUTPUT_FILE="$2"
+				if [ -f "$OUTPUT_FILE" ] ; then
+					# clear output file first
+					rm -f "$OUTPUT_FILE" > /dev/null 2>&1
+					touch "$OUTPUT_FILE"
+				fi
+                        	shift
+			fi
+			;;
+		$ARG_HELP)
+			SHOW_HELP_ONLY=1
+			;;
+		$ARG_JAVAHOME)
+			if [ -n "$2" ] ; then
+				LAUNCHER_JAVA="$2"
+				shift
+			fi
+			;;
+		$ARG_TEMPDIR)
+			if [ -n "$2" ] ; then
+				LAUNCHER_JVM_TEMP_DIR="$2"
+				shift
+			fi
+			;;
+		$ARG_EXTRACT)
+			EXTRACT_ONLY=1
+			if [ -n "$2" ] && [ `isLauncherCommandArgument "$2"` -eq 0 ] ; then
+				LAUNCHER_EXTRACT_DIR="$2"
+				shift
+			else
+				LAUNCHER_EXTRACT_DIR="$CURRENT_DIRECTORY"				
+			fi
+			;;
+		$ARG_SILENT)
+			SILENT_MODE=1
+			parseJvmAppArgument "$1"
+			;;
+		$ARG_LOCALE)
+			SYSTEM_LOCALE="$2"
+			LOCAL_OVERRIDDEN=1			
+			parseJvmAppArgument "$1"
+			;;
+		$ARG_CLASSPATHP)
+			if [ -n "$2" ] ; then
+				if [ -z "$PREPEND_CP" ] ; then
+					PREPEND_CP="$2"
+				else
+					PREPEND_CP="$2":"$PREPEND_CP"
+				fi
+				shift
+			fi
+			;;
+		$ARG_CLASSPATHA)
+			if [ -n "$2" ] ; then
+				if [ -z "$APPEND_CP" ] ; then
+					APPEND_CP="$2"
+				else
+					APPEND_CP="$APPEND_CP":"$2"
+				fi
+				shift
+			fi
+			;;
+
+		*)
+			parseJvmAppArgument "$1"
+		esac
+                shift
+	done
+}
+
+setLauncherLocale() {
+	if [ 0 -eq $LOCAL_OVERRIDDEN ] ; then		
+        	SYSTEM_LOCALE="$LANG"
+		debug "Setting initial launcher locale from the system : $SYSTEM_LOCALE"
+	else	
+		debug "Setting initial launcher locale using command-line argument : $SYSTEM_LOCALE"
+	fi
+
+	LAUNCHER_LOCALE="$SYSTEM_LOCALE"
+	
+	if [ -n "$LAUNCHER_LOCALE" ] ; then
+		# check if $LAUNCHER_LOCALE is in UTF-8
+		if [ 0 -eq $LOCAL_OVERRIDDEN ] ; then
+			removeUTFsuffix=`echo "$LAUNCHER_LOCALE" | sed "s/\.UTF-8//"`
+			isUTF=`ifEquals "$removeUTFsuffix" "$LAUNCHER_LOCALE"`
+			if [ 1 -eq $isUTF ] ; then
+				#set launcher locale to the default if the system locale name doesn`t containt  UTF-8
+				LAUNCHER_LOCALE=""
+			fi
+		fi
+
+        	localeChanged=0	
+		localeCounter=0
+		while [ $localeCounter -lt $LAUNCHER_LOCALES_NUMBER ] ; do		
+		    localeVar="$""LAUNCHER_LOCALE_NAME_$localeCounter"
+		    arg=`eval "echo \"$localeVar\""`		
+                    if [ -n "$arg" ] ; then 
+                        # if not a default locale			
+			# $comp length shows the difference between $SYSTEM_LOCALE and $arg
+  			# the less the length the less the difference and more coincedence
+
+                        comp=`echo "$SYSTEM_LOCALE" | sed -e "s/^${arg}//"`				
+			length1=`getStringLength "$comp"`
+                        length2=`getStringLength "$LAUNCHER_LOCALE"`
+                        if [ $length1 -lt $length2 ] ; then	
+				# more coincidence between $SYSTEM_LOCALE and $arg than between $SYSTEM_LOCALE and $arg
+                                compare=`ifLess "$comp" "$LAUNCHER_LOCALE"`
+				
+                                if [ 1 -eq $compare ] ; then
+                                        LAUNCHER_LOCALE="$arg"
+                                        localeChanged=1
+                                        debug "... setting locale to $arg"
+                                fi
+                                if [ -z "$comp" ] ; then
+					# means that $SYSTEM_LOCALE equals to $arg
+                                        break
+                                fi
+                        fi   
+                    else 
+                        comp="$SYSTEM_LOCALE"
+                    fi
+		    localeCounter=`expr "$localeCounter" + 1`
+       		done
+		if [ $localeChanged -eq 0 ] ; then 
+                	#set default
+                	LAUNCHER_LOCALE=""
+        	fi
+        fi
+
+        
+        debug "Final Launcher Locale : $LAUNCHER_LOCALE"	
+}
+
+escapeBackslash() {
+	echo "$1" | sed "s/\\\/\\\\\\\/g"
+}
+
+ifLess() {
+	arg1=`escapeBackslash "$1"`
+	arg2=`escapeBackslash "$2"`
+	compare=`awk 'END { if ( a < b ) { print 1 } else { print 0 } }' a="$arg1" b="$arg2" < /dev/null`
+	echo $compare
+}
+
+formatVersion() {
+        formatted=`echo "$1" | sed "s/-ea//g;s/-rc[0-9]*//g;s/-beta[0-9]*//g;s/-preview[0-9]*//g;s/-dp[0-9]*//g;s/-alpha[0-9]*//g;s/-fcs//g;s/_/./g;s/-/\./g"`
+        formatted=`echo "$formatted" | sed "s/^\(\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)\)\.b\([0-9][0-9]*\)/\1\.0\.\5/g"`
+        formatted=`echo "$formatted" | sed "s/\.b\([0-9][0-9]*\)/\.\1/g"`
+	echo "$formatted"
+
+}
+
+compareVersions() {
+        current1=`formatVersion "$1"`
+        current2=`formatVersion "$2"`
+	compresult=
+	#0 - equals
+	#-1 - less
+	#1 - more
+
+	while [ -z "$compresult" ] ; do
+		value1=`echo "$current1" | sed "s/\..*//g"`
+		value2=`echo "$current2" | sed "s/\..*//g"`
+
+
+		removeDots1=`echo "$current1" | sed "s/\.//g"`
+		removeDots2=`echo "$current2" | sed "s/\.//g"`
+
+		if [ 1 -eq `ifEquals "$current1" "$removeDots1"` ] ; then
+			remainder1=""
+		else
+			remainder1=`echo "$current1" | sed "s/^$value1\.//g"`
+		fi
+		if [ 1 -eq `ifEquals "$current2" "$removeDots2"` ] ; then
+			remainder2=""
+		else
+			remainder2=`echo "$current2" | sed "s/^$value2\.//g"`
+		fi
+
+		current1="$remainder1"
+		current2="$remainder2"
+		
+		if [ -z "$value1" ] || [ 0 -eq `ifNumber "$value1"` ] ; then 
+			value1=0 
+		fi
+		if [ -z "$value2" ] || [ 0 -eq `ifNumber "$value2"` ] ; then 
+			value2=0 
+		fi
+		if [ "$value1" -gt "$value2" ] ; then 
+			compresult=1
+			break
+		elif [ "$value2" -gt "$value1" ] ; then 
+			compresult=-1
+			break
+		fi
+
+		if [ -z "$current1" ] && [ -z "$current2" ] ; then	
+			compresult=0
+			break
+		fi
+	done
+	echo $compresult
+}
+
+ifVersionLess() {
+	compareResult=`compareVersions "$1" "$2"`
+        if [ -1 -eq $compareResult ] ; then
+            echo 1
+        else
+            echo 0
+        fi
+}
+
+ifVersionGreater() {
+	compareResult=`compareVersions "$1" "$2"`
+        if [ 1 -eq $compareResult ] ; then
+            echo 1
+        else
+            echo 0
+        fi
+}
+
+ifGreater() {
+	arg1=`escapeBackslash "$1"`
+	arg2=`escapeBackslash "$2"`
+
+	compare=`awk 'END { if ( a > b ) { print 1 } else { print 0 } }' a="$arg1" b="$arg2" < /dev/null`
+	echo $compare
+}
+
+ifEquals() {
+	arg1=`escapeBackslash "$1"`
+	arg2=`escapeBackslash "$2"`
+
+	compare=`awk 'END { if ( a == b ) { print 1 } else { print 0 } }' a="$arg1" b="$arg2" < /dev/null`
+	echo $compare
+}
+
+ifNumber() 
+{
+	result=0
+	if  [ -n "$1" ] ; then 
+		num=`echo "$1" | sed 's/[0-9]*//g' 2>/dev/null`
+		if [ -z "$num" ] ; then
+			result=1
+		fi
+	fi 
+	echo $result
+}
+getStringLength() {
+    strlength=`awk 'END{ print length(a) }' a="$1" < /dev/null`
+    echo $strlength
+}
+
+resolveRelativity() {
+	if [ 1 -eq `ifPathRelative "$1"` ] ; then
+		echo "$CURRENT_DIRECTORY"/"$1" | sed 's/\"//g' 2>/dev/null
+	else 
+		echo "$1"
+	fi
+}
+
+ifPathRelative() {
+	param="$1"
+	removeRoot=`echo "$param" | sed "s/^\\\///" 2>/dev/null`
+	echo `ifEquals "$param" "$removeRoot"` 2>/dev/null
+}
+
+
+initializeVariables() {	
+	debug "Launcher name is $LAUNCHER_NAME"
+	systemName=`uname`
+	debug "System name is $systemName"
+	isMacOSX=`ifEquals "$systemName" "Darwin"`	
+	isSolaris=`ifEquals "$systemName" "SunOS"`
+	if [ 1 -eq $isSolaris ] ; then
+		POSSIBLE_JAVA_EXE_SUFFIX="$POSSIBLE_JAVA_EXE_SUFFIX_SOLARIS"
+	else
+		POSSIBLE_JAVA_EXE_SUFFIX="$POSSIBLE_JAVA_EXE_SUFFIX_COMMON"
+	fi
+        if [ 1 -eq $isMacOSX ] ; then
+                # set default userdir and cachedir on MacOS
+                DEFAULT_USERDIR_ROOT="${HOME}/Library/Application Support/NetBeans"
+                DEFAULT_CACHEDIR_ROOT="${HOME}/Library/Caches/NetBeans"
+        else
+                # set default userdir and cachedir on unix systems
+                DEFAULT_USERDIR_ROOT=${HOME}/.netbeans
+                DEFAULT_CACHEDIR_ROOT=${HOME}/.cache/netbeans
+        fi
+	systemInfo=`uname -a 2>/dev/null`
+	debug "System Information:"
+	debug "$systemInfo"             
+	debug ""
+	DEFAULT_DISK_BLOCK_SIZE=512
+	LAUNCHER_TRACKING_SIZE=$LAUNCHER_STUB_SIZE
+	LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_STUB_SIZE" \* "$FILE_BLOCK_SIZE"`
+	getLauncherLocation
+}
+
+parseJvmAppArgument() {
+        param="$1"
+	arg=`echo "$param" | sed "s/^-J//"`
+	argEscaped=`escapeString "$arg"`
+
+	if [ "$param" = "$arg" ] ; then
+	    LAUNCHER_APP_ARGUMENTS="$LAUNCHER_APP_ARGUMENTS $argEscaped"
+	else
+	    LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS $argEscaped"
+	fi	
+}
+
+getLauncherLocation() {
+	# if file path is relative then prepend it with current directory
+	LAUNCHER_FULL_PATH=`resolveRelativity "$LAUNCHER_NAME"`
+	debug "... normalizing full path"
+	LAUNCHER_FULL_PATH=`normalizePath "$LAUNCHER_FULL_PATH"`
+	debug "... getting dirname"
+	LAUNCHER_DIR=`dirname "$LAUNCHER_FULL_PATH"`
+	debug "Full launcher path = $LAUNCHER_FULL_PATH"
+	debug "Launcher directory = $LAUNCHER_DIR"
+}
+
+getLauncherSize() {
+	lsOutput=`ls -l --block-size=1 "$LAUNCHER_FULL_PATH" 2>/dev/null`
+	if [ $? -ne 0 ] ; then
+	    #default block size
+	    lsOutput=`ls -l "$LAUNCHER_FULL_PATH" 2>/dev/null`
+	fi
+	echo "$lsOutput" | awk ' { print $5 }' 2>/dev/null
+}
+
+verifyIntegrity() {
+	size=`getLauncherSize`
+	extractedSize=$LAUNCHER_TRACKING_SIZE_BYTES
+	if [ 1 -eq `ifNumber "$size"` ] ; then
+		debug "... check integrity"
+		debug "... minimal size : $extractedSize"
+		debug "... real size    : $size"
+
+        	if [ $size -lt $extractedSize ] ; then
+			debug "... integration check FAILED"
+			message "$MSG_ERROR_INTEGRITY" `normalizePath "$LAUNCHER_FULL_PATH"`
+			exitProgram $ERROR_INTEGRITY
+		fi
+		debug "... integration check OK"
+	fi
+}
+showHelp() {
+	msg0=`message "$MSG_USAGE"`
+	msg1=`message "$MSG_ARG_JAVAHOME $ARG_JAVAHOME"`
+	msg2=`message "$MSG_ARG_TEMPDIR $ARG_TEMPDIR"`
+	msg3=`message "$MSG_ARG_EXTRACT $ARG_EXTRACT"`
+	msg4=`message "$MSG_ARG_OUTPUT $ARG_OUTPUT"`
+	msg5=`message "$MSG_ARG_VERBOSE $ARG_VERBOSE"`
+	msg6=`message "$MSG_ARG_CPA $ARG_CLASSPATHA"`
+	msg7=`message "$MSG_ARG_CPP $ARG_CLASSPATHP"`
+	msg8=`message "$MSG_ARG_DISABLE_FREE_SPACE_CHECK $ARG_NOSPACECHECK"`
+        msg9=`message "$MSG_ARG_LOCALE $ARG_LOCALE"`
+        msg10=`message "$MSG_ARG_SILENT $ARG_SILENT"`
+	msg11=`message "$MSG_ARG_HELP $ARG_HELP"`
+	out "$msg0"
+	out "$msg1"
+	out "$msg2"
+	out "$msg3"
+	out "$msg4"
+	out "$msg5"
+	out "$msg6"
+	out "$msg7"
+	out "$msg8"
+	out "$msg9"
+	out "$msg10"
+	out "$msg11"
+	exitProgram $ERROR_OK
+}
+
+exitProgram() {
+	if [ 0 -eq $EXTRACT_ONLY ] ; then
+	    if [ -n "$LAUNCHER_EXTRACT_DIR" ] && [ -d "$LAUNCHER_EXTRACT_DIR" ]; then		
+		debug "Removing directory $LAUNCHER_EXTRACT_DIR"
+		rm -rf "$LAUNCHER_EXTRACT_DIR" > /dev/null 2>&1
+	    fi
+	fi
+	debug "exitCode = $1"
+	exit $1
+}
+
+debug() {
+        if [ $USE_DEBUG_OUTPUT -eq 1 ] ; then
+		timestamp=`date '+%Y-%m-%d %H:%M:%S'`
+                out "[$timestamp]> $1"
+        fi
+}
+
+out() {
+	
+        if [ -n "$OUTPUT_FILE" ] ; then
+                printf "%s\n" "$@" >> "$OUTPUT_FILE"
+        elif [ 0 -eq $SILENT_MODE ] ; then
+                printf "%s\n" "$@"
+	fi
+}
+
+message() {        
+        msg=`getMessage "$@"`
+        out "$msg"
+}
+
+
+createTempDirectory() {
+	if [ 0 -eq $EXTRACT_ONLY ] ; then
+            if [ -z "$LAUNCHER_JVM_TEMP_DIR" ] ; then
+		if [ 0 -eq $EXTRACT_ONLY ] ; then
+                    if [ -n "$TEMP" ] && [ -d "$TEMP" ] ; then
+                        debug "TEMP var is used : $TEMP"
+                        LAUNCHER_JVM_TEMP_DIR="$TEMP"
+                    elif [ -n "$TMP" ] && [ -d "$TMP" ] ; then
+                        debug "TMP var is used : $TMP"
+                        LAUNCHER_JVM_TEMP_DIR="$TMP"
+                    elif [ -n "$TEMPDIR" ] && [ -d "$TEMPDIR" ] ; then
+                        debug "TEMPDIR var is used : $TEMPDIR"
+                        LAUNCHER_JVM_TEMP_DIR="$TEMPDIR"
+                    elif [ -d "/tmp" ] ; then
+                        debug "Using /tmp for temp"
+                        LAUNCHER_JVM_TEMP_DIR="/tmp"
+                    else
+                        debug "Using home dir for temp"
+                        LAUNCHER_JVM_TEMP_DIR="$HOME"
+                    fi
+		else
+		    #extract only : to the curdir
+		    LAUNCHER_JVM_TEMP_DIR="$CURRENT_DIRECTORY"		    
+		fi
+            fi
+            # if temp dir does not exist then try to create it
+            if [ ! -d "$LAUNCHER_JVM_TEMP_DIR" ] ; then
+                mkdir -p "$LAUNCHER_JVM_TEMP_DIR" > /dev/null 2>&1
+                if [ $? -ne 0 ] ; then                        
+                        message "$MSG_ERROR_TMPDIR" "$LAUNCHER_JVM_TEMP_DIR"
+                        exitProgram $ERROR_TEMP_DIRECTORY
+                fi
+            fi		
+            debug "Launcher TEMP ROOT = $LAUNCHER_JVM_TEMP_DIR"
+            subDir=`date '+%u%m%M%S'`
+            subDir=`echo ".nbi-$subDir.tmp"`
+            LAUNCHER_EXTRACT_DIR="$LAUNCHER_JVM_TEMP_DIR/$subDir"
+	else
+	    #extracting to the $LAUNCHER_EXTRACT_DIR
+            debug "Launcher Extracting ROOT = $LAUNCHER_EXTRACT_DIR"
+	fi
+
+        if [ ! -d "$LAUNCHER_EXTRACT_DIR" ] ; then
+                mkdir -p "$LAUNCHER_EXTRACT_DIR" > /dev/null 2>&1
+                if [ $? -ne 0 ] ; then                        
+                        message "$MSG_ERROR_TMPDIR"  "$LAUNCHER_EXTRACT_DIR"
+                        exitProgram $ERROR_TEMP_DIRECTORY
+                fi
+        else
+                debug "$LAUNCHER_EXTRACT_DIR is directory and exist"
+        fi
+        debug "Using directory $LAUNCHER_EXTRACT_DIR for extracting data"
+}
+extractJVMData() {
+	debug "Extracting testJVM file data..."
+        extractTestJVMFile
+	debug "Extracting bundled JVMs ..."
+	extractJVMFiles        
+	debug "Extracting JVM data done"
+}
+extractBundledData() {
+	message "$MSG_EXTRACTING"
+	debug "Extracting bundled jars  data..."
+	extractJars		
+	debug "Extracting other  data..."
+	extractOtherData
+	debug "Extracting bundled data finished..."
+}
+
+setTestJVMClasspath() {
+	testjvmname=`basename "$TEST_JVM_PATH"`
+	removeClassSuffix=`echo "$testjvmname" | sed 's/\.class$//'`
+	notClassFile=`ifEquals "$testjvmname" "$removeClassSuffix"`
+		
+	if [ -d "$TEST_JVM_PATH" ] ; then
+		TEST_JVM_CLASSPATH="$TEST_JVM_PATH"
+		debug "... testJVM path is a directory"
+	elif [ $isSymlink "$TEST_JVM_PATH" ] && [ $notClassFile -eq 1 ] ; then
+		TEST_JVM_CLASSPATH="$TEST_JVM_PATH"
+		debug "... testJVM path is a link but not a .class file"
+	else
+		if [ $notClassFile -eq 1 ] ; then
+			debug "... testJVM path is a jar/zip file"
+			TEST_JVM_CLASSPATH="$TEST_JVM_PATH"
+		else
+			debug "... testJVM path is a .class file"
+			TEST_JVM_CLASSPATH=`dirname "$TEST_JVM_PATH"`
+		fi        
+	fi
+	debug "... testJVM classpath is : $TEST_JVM_CLASSPATH"
+}
+
+extractTestJVMFile() {
+        TEST_JVM_PATH=`resolveResourcePath "TEST_JVM_FILE"`
+	extractResource "TEST_JVM_FILE"
+	setTestJVMClasspath
+        
+}
+
+installJVM() {
+	message "$MSG_PREPARE_JVM"	
+	jvmFile=`resolveRelativity "$1"`
+	jvmDir=`dirname "$jvmFile"`/_jvm
+	debug "JVM Directory : $jvmDir"
+	mkdir "$jvmDir" > /dev/null 2>&1
+	if [ $? != 0 ] ; then
+		message "$MSG_ERROR_EXTRACT_JVM"
+		exitProgram $ERROR_JVM_EXTRACTION
+	fi
+        chmod +x "$jvmFile" > /dev/null  2>&1
+	jvmFileEscaped=`escapeString "$jvmFile"`
+        jvmDirEscaped=`escapeString "$jvmDir"`
+	cd "$jvmDir"
+        runCommand "$jvmFileEscaped"
+	ERROR_CODE=$?
+
+        cd "$CURRENT_DIRECTORY"
+
+	if [ $ERROR_CODE != 0 ] ; then		
+	        message "$MSG_ERROR_EXTRACT_JVM"
+		exitProgram $ERROR_JVM_EXTRACTION
+	fi
+	
+	files=`find "$jvmDir" -name "*.jar.pack.gz" -print`
+	debug "Packed files : $files"
+	f="$files"
+	fileCounter=1;
+	while [ -n "$f" ] ; do
+		f=`echo "$files" | sed -n "${fileCounter}p" 2>/dev/null`
+		debug "... next file is $f"				
+		if [ -n "$f" ] ; then
+			debug "... packed file  = $f"
+			unpacked=`echo "$f" | sed s/\.pack\.gz//`
+			debug "... unpacked file = $unpacked"
+			fEsc=`escapeString "$f"`
+			uEsc=`escapeString "$unpacked"`
+			cmd="$jvmDirEscaped/bin/unpack200 -r $fEsc $uEsc"
+			runCommand "$cmd"
+			if [ $? != 0 ] ; then
+			    message "$MSG_ERROR_UNPACK_JVM_FILE" "$f"
+			    exitProgram $ERROR_JVM_UNPACKING
+			fi		
+		fi					
+		fileCounter=`expr "$fileCounter" + 1`
+	done
+		
+	verifyJVM "$jvmDir"
+	if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
+		message "$MSG_ERROR_VERIFY_BUNDLED_JVM"
+		exitProgram $ERROR_VERIFY_BUNDLED_JVM
+	fi
+}
+
+resolveResourcePath() {
+	resourcePrefix="$1"
+	resourceVar="$""$resourcePrefix""_PATH"
+	resourceName=`eval "echo \"$resourceVar\""`
+	resourcePath=`resolveString "$resourceName"`
+    	echo "$resourcePath"
+
+}
+
+resolveResourceSize() {
+	resourcePrefix="$1"
+	resourceVar="$""$resourcePrefix""_SIZE"
+	resourceSize=`eval "echo \"$resourceVar\""`
+    	echo "$resourceSize"
+}
+
+resolveResourceMd5() {
+	resourcePrefix="$1"
+	resourceVar="$""$resourcePrefix""_MD5"
+	resourceMd5=`eval "echo \"$resourceVar\""`
+    	echo "$resourceMd5"
+}
+
+resolveResourceType() {
+	resourcePrefix="$1"
+	resourceVar="$""$resourcePrefix""_TYPE"
+	resourceType=`eval "echo \"$resourceVar\""`
+	echo "$resourceType"
+}
+
+extractResource() {	
+	debug "... extracting resource" 
+        resourcePrefix="$1"
+	debug "... resource prefix id=$resourcePrefix"	
+	resourceType=`resolveResourceType "$resourcePrefix"`
+	debug "... resource type=$resourceType"	
+	if [ $resourceType -eq 0 ] ; then
+                resourceSize=`resolveResourceSize "$resourcePrefix"`
+		debug "... resource size=$resourceSize"
+            	resourcePath=`resolveResourcePath "$resourcePrefix"`
+	    	debug "... resource path=$resourcePath"
+            	extractFile "$resourceSize" "$resourcePath"
+                resourceMd5=`resolveResourceMd5 "$resourcePrefix"`
+	    	debug "... resource md5=$resourceMd5"
+                checkMd5 "$resourcePath" "$resourceMd5"
+		debug "... done"
+	fi
+	debug "... extracting resource finished"	
+        
+}
+
+extractJars() {
+        counter=0
+	while [ $counter -lt $JARS_NUMBER ] ; do
+		extractResource "JAR_$counter"
+		counter=`expr "$counter" + 1`
+	done
+}
+
+extractOtherData() {
+        counter=0
+	while [ $counter -lt $OTHER_RESOURCES_NUMBER ] ; do
+		extractResource "OTHER_RESOURCE_$counter"
+		counter=`expr "$counter" + 1`
+	done
+}
+
+extractJVMFiles() {
+	javaCounter=0
+	debug "... total number of JVM files : $JAVA_LOCATION_NUMBER"
+	while [ $javaCounter -lt $JAVA_LOCATION_NUMBER ] ; do		
+		extractResource "JAVA_LOCATION_$javaCounter"
+		javaCounter=`expr "$javaCounter" + 1`
+	done
+}
+
+
+processJarsClasspath() {
+	JARS_CLASSPATH=""
+	jarsCounter=0
+	while [ $jarsCounter -lt $JARS_NUMBER ] ; do
+		resolvedFile=`resolveResourcePath "JAR_$jarsCounter"`
+		debug "... adding jar to classpath : $resolvedFile"
+		if [ ! -f "$resolvedFile" ] && [ ! -d "$resolvedFile" ] && [ ! $isSymlink "$resolvedFile" ] ; then
+				message "$MSG_ERROP_MISSING_RESOURCE" "$resolvedFile"
+				exitProgram $ERROR_MISSING_RESOURCES
+		else
+			if [ -z "$JARS_CLASSPATH" ] ; then
+				JARS_CLASSPATH="$resolvedFile"
+			else				
+				JARS_CLASSPATH="$JARS_CLASSPATH":"$resolvedFile"
+			fi
+		fi			
+			
+		jarsCounter=`expr "$jarsCounter" + 1`
+	done
+	debug "Jars classpath : $JARS_CLASSPATH"
+}
+
+extractFile() {
+        start=$LAUNCHER_TRACKING_SIZE
+        size=$1 #absolute size
+        name="$2" #relative part        
+        fullBlocks=`expr $size / $FILE_BLOCK_SIZE`
+        fullBlocksSize=`expr "$FILE_BLOCK_SIZE" \* "$fullBlocks"`
+        oneBlocks=`expr  $size - $fullBlocksSize`
+	oneBlocksStart=`expr "$start" + "$fullBlocks"`
+
+	checkFreeSpace $size "$name"	
+	LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_TRACKING_SIZE" \* "$FILE_BLOCK_SIZE"`
+
+	if [ 0 -eq $diskSpaceCheck ] ; then
+		dir=`dirname "$name"`
+		message "$MSG_ERROR_FREESPACE" "$size" "$ARG_TEMPDIR"	
+		exitProgram $ERROR_FREESPACE
+	fi
+
+        if [ 0 -lt "$fullBlocks" ] ; then
+                # file is larger than FILE_BLOCK_SIZE
+                dd if="$LAUNCHER_FULL_PATH" of="$name" \
+                        bs="$FILE_BLOCK_SIZE" count="$fullBlocks" skip="$start"\
+			> /dev/null  2>&1
+		LAUNCHER_TRACKING_SIZE=`expr "$LAUNCHER_TRACKING_SIZE" + "$fullBlocks"`
+		LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_TRACKING_SIZE" \* "$FILE_BLOCK_SIZE"`
+        fi
+        if [ 0 -lt "$oneBlocks" ] ; then
+		dd if="$LAUNCHER_FULL_PATH" of="$name.tmp.tmp" bs="$FILE_BLOCK_SIZE" count=1\
+			skip="$oneBlocksStart"\
+			 > /dev/null 2>&1
+
+		dd if="$name.tmp.tmp" of="$name" bs=1 count="$oneBlocks" seek="$fullBlocksSize"\
+			 > /dev/null 2>&1
+
+		rm -f "$name.tmp.tmp"
+		LAUNCHER_TRACKING_SIZE=`expr "$LAUNCHER_TRACKING_SIZE" + 1`
+
+		LAUNCHER_TRACKING_SIZE_BYTES=`expr "$LAUNCHER_TRACKING_SIZE_BYTES" + "$oneBlocks"`
+        fi        
+}
+
+md5_program=""
+no_md5_program_id="no_md5_program"
+
+initMD5program() {
+    if [ -z "$md5_program" ] ; then 
+        type digest >> /dev/null 2>&1
+        if [ 0 -eq $? ] ; then
+            md5_program="digest -a md5"
+        else
+            type md5sum >> /dev/null 2>&1
+            if [ 0 -eq $? ] ; then
+                md5_program="md5sum"
+            else 
+                type gmd5sum >> /dev/null 2>&1
+                if [ 0 -eq $? ] ; then
+                    md5_program="gmd5sum"
+                else
+                    type md5 >> /dev/null 2>&1
+                    if [ 0 -eq $? ] ; then
+                        md5_program="md5 -q"
+                    else 
+                        md5_program="$no_md5_program_id"
+                    fi
+                fi
+            fi
+        fi
+        debug "... program to check: $md5_program"
+    fi
+}
+
+checkMd5() {
+     name="$1"
+     md5="$2"     
+     if [ 32 -eq `getStringLength "$md5"` ] ; then
+         #do MD5 check         
+         initMD5program            
+         if [ 0 -eq `ifEquals "$md5_program" "$no_md5_program_id"` ] ; then
+            debug "... check MD5 of file : $name"           
+            debug "... expected md5: $md5"
+            realmd5=`$md5_program "$name" 2>/dev/null | sed "s/ .*//g"`
+            debug "... real md5 : $realmd5"
+            if [ 32 -eq `getStringLength "$realmd5"` ] ; then
+                if [ 0 -eq `ifEquals "$md5" "$realmd5"` ] ; then
+                        debug "... integration check FAILED"
+			message "$MSG_ERROR_INTEGRITY" `normalizePath "$LAUNCHER_FULL_PATH"`
+			exitProgram $ERROR_INTEGRITY
+                fi
+            else
+                debug "... looks like not the MD5 sum"
+            fi
+         fi
+     fi   
+}
+searchJavaEnvironment() {
+     if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
+		    # search java in the environment
+		
+            	    ptr="$POSSIBLE_JAVA_ENV"
+            	    while [ -n "$ptr" ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
+			argJavaHome=`echo "$ptr" | sed "s/:.*//"`
+			back=`echo "$argJavaHome" | sed "s/\\\//\\\\\\\\\//g"`
+		    	end=`echo "$ptr"       | sed "s/${back}://"`
+			argJavaHome=`echo "$back" | sed "s/\\\\\\\\\//\\\//g"`
+			ptr="$end"
+                        eval evaluated=`echo \\$$argJavaHome` > /dev/null
+                        if [ -n "$evaluated" ] ; then
+                                debug "EnvVar $argJavaHome=$evaluated"				
+                                verifyJVM "$evaluated"
+                        fi
+            	    done
+     fi
+}
+
+installBundledJVMs() {
+	if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
+	    # search bundled java in the common list
+	    javaCounter=0
+    	    while [ $javaCounter -lt $JAVA_LOCATION_NUMBER ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
+	    	fileType=`resolveResourceType "JAVA_LOCATION_$javaCounter"`
+		
+		if [ $fileType -eq 0 ] ; then # bundled->install
+			argJavaHome=`resolveResourcePath "JAVA_LOCATION_$javaCounter"`
+			installJVM  "$argJavaHome"				
+        	fi
+		javaCounter=`expr "$javaCounter" + 1`
+    	    done
+	fi
+}
+
+searchJavaOnMacOs() {
+        if [ -x "/usr/libexec/java_home" ]; then
+            javaOnMacHome=`/usr/libexec/java_home --version 1.8+ --failfast`
+        fi
+
+        if [ ! -x "$javaOnMacHome/bin/java" -a -f "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" ] ; then
+            javaOnMacHome=`echo "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"`
+        fi
+
+        verifyJVM "$javaOnMacHome"
+}
+
+searchJavaSystemDefault() {
+        if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
+            debug "... check default java in the path"
+            java_bin=`which java 2>&1`
+            if [ $? -eq 0 ] && [ -n "$java_bin" ] ; then
+                remove_no_java_in=`echo "$java_bin" | sed "s/no java in//g"`
+                if [ 1 -eq `ifEquals "$remove_no_java_in" "$java_bin"` ] && [ -f "$java_bin" ] ; then
+                    debug "... java in path found: $java_bin"
+                    # java is in path
+                    java_bin=`resolveSymlink "$java_bin"`
+                    debug "... java real path: $java_bin"
+                    parentDir=`dirname "$java_bin"`
+                    if [ -n "$parentDir" ] ; then
+                        parentDir=`dirname "$parentDir"`
+                        if [ -n "$parentDir" ] ; then
+                            debug "... java home path: $parentDir"
+                            parentDir=`resolveSymlink "$parentDir"`
+                            debug "... java home real path: $parentDir"
+                            verifyJVM "$parentDir"
+                        fi
+                    fi
+                fi
+            fi
+	fi
+}
+
+searchJavaSystemPaths() {
+	if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
+	    # search java in the common system paths
+	    javaCounter=0
+    	    while [ $javaCounter -lt $JAVA_LOCATION_NUMBER ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
+	    	fileType=`resolveResourceType "JAVA_LOCATION_$javaCounter"`
+	    	argJavaHome=`resolveResourcePath "JAVA_LOCATION_$javaCounter"`
+
+	    	debug "... next location $argJavaHome"
+		
+		if [ $fileType -ne 0 ] ; then # bundled JVMs have already been proceeded
+			argJavaHome=`escapeString "$argJavaHome"`
+			locations=`ls -d -1 $argJavaHome 2>/dev/null`
+			nextItem="$locations"
+			itemCounter=1
+			while [ -n "$nextItem" ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do
+				nextItem=`echo "$locations" | sed -n "${itemCounter}p" 2>/dev/null`
+				debug "... next item is $nextItem"				
+				nextItem=`removeEndSlashes "$nextItem"`
+				if [ -n "$nextItem" ] ; then
+					if [ -d "$nextItem" ] || [ $isSymlink "$nextItem" ] ; then
+	               				debug "... checking item : $nextItem"
+						verifyJVM "$nextItem"
+					fi
+				fi					
+				itemCounter=`expr "$itemCounter" + 1`
+			done
+		fi
+		javaCounter=`expr "$javaCounter" + 1`
+    	    done
+	fi
+}
+
+searchJavaUserDefined() {
+	if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
+        	if [ -n "$LAUNCHER_JAVA" ] ; then
+                	verifyJVM "$LAUNCHER_JAVA"
+		
+			if [ $VERIFY_UNCOMPATIBLE -eq $verifyResult ] ; then
+		    		message "$MSG_ERROR_JVM_UNCOMPATIBLE" "$LAUNCHER_JAVA" "$ARG_JAVAHOME"
+		    		exitProgram $ERROR_JVM_UNCOMPATIBLE
+			elif [ $VERIFY_NOJAVA -eq $verifyResult ] ; then
+				message "$MSG_ERROR_USER_ERROR" "$LAUNCHER_JAVA"
+		    		exitProgram $ERROR_JVM_NOT_FOUND
+			fi
+        	fi
+	fi
+}
+
+searchJavaInstallFolder() {
+        installFolder="`dirname \"$0\"`"
+        installFolder="`( cd \"$installFolder\" && pwd )`"
+        installFolder="$installFolder/bin/jre"
+        tempJreFolder="$TEST_JVM_CLASSPATH/_jvm"
+
+        if [ -d "$installFolder" ] ; then
+            #copy nested JRE to temp folder
+            cp -r "$installFolder" "$tempJreFolder"
+
+            verifyJVM "$tempJreFolder"
+        fi
+}
+
+searchJava() {
+	message "$MSG_JVM_SEARCH"
+        if [ ! -f "$TEST_JVM_CLASSPATH" ] && [ ! $isSymlink "$TEST_JVM_CLASSPATH" ] && [ ! -d "$TEST_JVM_CLASSPATH" ]; then
+                debug "Cannot find file for testing JVM at $TEST_JVM_CLASSPATH"
+		message "$MSG_ERROR_JVM_NOT_FOUND" "$ARG_JAVAHOME"
+                exitProgram $ERROR_TEST_JVM_FILE
+        else	
+                searchJavaInstallFolder
+		searchJavaUserDefined
+		installBundledJVMs
+		searchJavaEnvironment
+		searchJavaSystemDefault
+		searchJavaSystemPaths
+                if [ 1 -eq $isMacOSX ] ; then
+                    searchJavaOnMacOs
+                fi
+        fi
+
+	if [ -z "$LAUNCHER_JAVA_EXE" ] ; then
+		message "$MSG_ERROR_JVM_NOT_FOUND" "$ARG_JAVAHOME"
+		exitProgram $ERROR_JVM_NOT_FOUND
+	fi
+}
+
+normalizePath() {	
+	argument="$1"
+  
+  # replace all /./ to /
+	while [ 0 -eq 0 ] ; do	
+		testArgument=`echo "$argument" | sed 's/\/\.\//\//g' 2> /dev/null`
+		if [ -n "$testArgument" ] && [ 0 -eq `ifEquals "$argument" "$testArgument"` ] ; then
+		  # something changed
+			argument="$testArgument"
+		else
+			break
+		fi	
+	done
+
+	# replace XXX/../YYY to 'dirname XXX'/YYY
+	while [ 0 -eq 0 ] ; do	
+		beforeDotDot=`echo "$argument" | sed "s/\/\.\.\/.*//g" 2> /dev/null`
+      if [ 0 -eq `ifEquals "$beforeDotDot" "$argument"` ] && [ 0 -eq `ifEquals "$beforeDotDot" "."` ] && [ 0 -eq `ifEquals "$beforeDotDot" ".."` ] ; then
+        esc=`echo "$beforeDotDot" | sed "s/\\\//\\\\\\\\\//g"`
+        afterDotDot=`echo "$argument" | sed "s/^$esc\/\.\.//g" 2> /dev/null` 
+        parent=`dirname "$beforeDotDot"`
+        argument=`echo "$parent""$afterDotDot"`
+		else 
+      break
+		fi	
+	done
+
+	# replace XXX/.. to 'dirname XXX'
+	while [ 0 -eq 0 ] ; do	
+		beforeDotDot=`echo "$argument" | sed "s/\/\.\.$//g" 2> /dev/null`
+    if [ 0 -eq `ifEquals "$beforeDotDot" "$argument"` ] && [ 0 -eq `ifEquals "$beforeDotDot" "."` ] && [ 0 -eq `ifEquals "$beforeDotDot" ".."` ] ; then
+		  argument=`dirname "$beforeDotDot"`
+		else 
+      break
+		fi	
+	done
+
+  # remove /. a the end (if the resulting string is not zero)
+	testArgument=`echo "$argument" | sed 's/\/\.$//' 2> /dev/null`
+	if [ -n "$testArgument" ] ; then
+		argument="$testArgument"
+	fi
+
+	# replace more than 2 separators to 1
+	testArgument=`echo "$argument" | sed 's/\/\/*/\//g' 2> /dev/null`
+	if [ -n "$testArgument" ] ; then
+		argument="$testArgument"
+	fi
+	
+	echo "$argument"	
+}
+
+resolveSymlink() {  
+    pathArg="$1"	
+    while [ $isSymlink "$pathArg" ] ; do
+        ls=`ls -ld "$pathArg"`
+        link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
+    
+        if expr "$link" : '^/' 2> /dev/null >/dev/null; then
+		pathArg="$link"
+        else
+		pathArg="`dirname "$pathArg"`"/"$link"
+        fi
+	pathArg=`normalizePath "$pathArg"` 
+    done
+    echo "$pathArg"
+}
+
+verifyJVM() {                
+    javaTryPath=`normalizePath "$1"` 
+    verifyJavaHome "$javaTryPath"
+    if [ $VERIFY_OK -ne $verifyResult ] ; then
+	savedResult=$verifyResult
+
+    	if [ 0 -eq $isMacOSX ] ; then
+        	#check private jre
+		javaTryPath="$javaTryPath""/jre"
+		verifyJavaHome "$javaTryPath"	
+    	else
+		#check MacOSX Home dir
+		javaTryPath="$javaTryPath""/Home"
+		verifyJavaHome "$javaTryPath"			
+	fi	
+	
+	if [ $VERIFY_NOJAVA -eq $verifyResult ] ; then                                           
+		verifyResult=$savedResult
+	fi 
+    fi
+}
+
+removeEndSlashes() {
+ arg="$1"
+ tryRemove=`echo "$arg" | sed 's/\/\/*$//' 2>/dev/null`
+ if [ -n "$tryRemove" ] ; then
+      arg="$tryRemove"
+ fi
+ echo "$arg"
+}
+
+checkJavaHierarchy() {
+	# return 0 on no java
+	# return 1 on jre
+	# return 2 on jdk
+
+	tryJava="$1"
+	javaHierarchy=0
+	if [ -n "$tryJava" ] ; then
+		if [ -d "$tryJava" ] || [ $isSymlink "$tryJava" ] ; then # existing directory or a isSymlink        			
+			javaBin="$tryJava"/"bin"
+	        
+			if [ -d "$javaBin" ] || [ $isSymlink "$javaBin" ] ; then
+				javaBinJavac="$javaBin"/"javac"
+				if [ -f "$javaBinJavac" ] || [ $isSymlink "$javaBinJavac" ] ; then
+					#definitely JDK as the JRE doesn`t contain javac
+					javaHierarchy=2				
+				else
+					#check if we inside JRE
+					javaBinJava="$javaBin"/"java"
+					if [ -f "$javaBinJava" ] || [ $isSymlink "$javaBinJava" ] ; then
+						javaHierarchy=1
+					fi					
+				fi
+			fi
+		fi
+	fi
+	if [ 0 -eq $javaHierarchy ] ; then
+		debug "... no java there"
+	elif [ 1 -eq $javaHierarchy ] ; then
+		debug "... JRE there"
+	elif [ 2 -eq $javaHierarchy ] ; then
+		debug "... JDK there"
+	fi
+}
+
+verifyJavaHome() { 
+    verifyResult=$VERIFY_NOJAVA
+    java=`removeEndSlashes "$1"`
+    debug "... verify    : $java"    
+
+    java=`resolveSymlink "$java"`    
+    debug "... real path : $java"
+
+    checkJavaHierarchy "$java"
+	
+    if [ 0 -ne $javaHierarchy ] ; then 
+	testJVMclasspath=`escapeString "$TEST_JVM_CLASSPATH"`
+	testJVMclass=`escapeString "$TEST_JVM_CLASS"`
+
+        pointer="$POSSIBLE_JAVA_EXE_SUFFIX"
+        while [ -n "$pointer" ] && [ -z "$LAUNCHER_JAVA_EXE" ]; do
+            arg=`echo "$pointer" | sed "s/:.*//"`
+	    back=`echo "$arg" | sed "s/\\\//\\\\\\\\\//g"`
+	    end=`echo "$pointer"       | sed "s/${back}://"`
+	    arg=`echo "$back" | sed "s/\\\\\\\\\//\\\//g"`
+	    pointer="$end"
+            javaExe="$java/$arg"	    
+
+            if [ -x "$javaExe" ] ; then		
+                javaExeEscaped=`escapeString "$javaExe"`
+                command="$javaExeEscaped -classpath $testJVMclasspath $testJVMclass"
+
+                debug "Executing java verification command..."
+		debug "$command"
+                output=`eval "$command" 2>/dev/null`
+                javaVersion=`echo "$output"   | sed "2d;3d;4d;5d"`
+		javaVmVersion=`echo "$output" | sed "1d;3d;4d;5d"`
+		vendor=`echo "$output"        | sed "1d;2d;4d;5d"`
+		osname=`echo "$output"        | sed "1d;2d;3d;5d"`
+		osarch=`echo "$output"        | sed "1d;2d;3d;4d"`
+
+		debug "Java :"
+                debug "       executable = {$javaExe}"	
+		debug "      javaVersion = {$javaVersion}"
+		debug "    javaVmVersion = {$javaVmVersion}"
+		debug "           vendor = {$vendor}"
+		debug "           osname = {$osname}"
+		debug "           osarch = {$osarch}"
+		comp=0
+
+		if [ -n "$javaVersion" ] && [ -n "$javaVmVersion" ] && [ -n "$vendor" ] && [ -n "$osname" ] && [ -n "$osarch" ] ; then
+		    debug "... seems to be java indeed"
+		    javaVersionEsc=`escapeBackslash "$javaVersion"`
+                    javaVmVersionEsc=`escapeBackslash "$javaVmVersion"`
+                    javaVersion=`awk 'END { idx = index(b,a); if(idx!=0) { print substr(b,idx,length(b)) } else { print a } }' a="$javaVersionEsc" b="$javaVmVersionEsc" < /dev/null`
+
+		    #remove build number
+		    javaVersion=`echo "$javaVersion" | sed 's/-.*$//;s/\ .*//'`
+		    verifyResult=$VERIFY_UNCOMPATIBLE
+
+	            if [ -n "$javaVersion" ] ; then
+			debug " checking java version = {$javaVersion}"
+			javaCompCounter=0
+
+			while [ $javaCompCounter -lt $JAVA_COMPATIBLE_PROPERTIES_NUMBER ] && [ -z "$LAUNCHER_JAVA_EXE" ] ; do				
+				comp=1
+				setJavaCompatibilityProperties_$javaCompCounter
+				debug "Min Java Version : $JAVA_COMP_VERSION_MIN"
+				debug "Max Java Version : $JAVA_COMP_VERSION_MAX"
+				debug "Java Vendor      : $JAVA_COMP_VENDOR"
+				debug "Java OS Name     : $JAVA_COMP_OSNAME"
+				debug "Java OS Arch     : $JAVA_COMP_OSARCH"
+
+				if [ -n "$JAVA_COMP_VERSION_MIN" ] ; then
+                                    compMin=`ifVersionLess "$javaVersion" "$JAVA_COMP_VERSION_MIN"`
+                                    if [ 1 -eq $compMin ] ; then
+                                        comp=0
+                                    fi
+				fi
+
+		                if [ -n "$JAVA_COMP_VERSION_MAX" ] ; then
+                                    compMax=`ifVersionGreater "$javaVersion" "$JAVA_COMP_VERSION_MAX"`
+                                    if [ 1 -eq $compMax ] ; then
+                                        comp=0
+                                    fi
+		                fi				
+				if [ -n "$JAVA_COMP_VENDOR" ] ; then
+					debug " checking vendor = {$vendor}, {$JAVA_COMP_VENDOR}"
+					subs=`echo "$vendor" | sed "s/${JAVA_COMP_VENDOR}//"`
+					if [ `ifEquals "$subs" "$vendor"` -eq 1 ]  ; then
+						comp=0
+						debug "... vendor incompatible"
+					fi
+				fi
+	
+				if [ -n "$JAVA_COMP_OSNAME" ] ; then
+					debug " checking osname = {$osname}, {$JAVA_COMP_OSNAME}"
+					subs=`echo "$osname" | sed "s/${JAVA_COMP_OSNAME}//"`
+					
+					if [ `ifEquals "$subs" "$osname"` -eq 1 ]  ; then
+						comp=0
+						debug "... osname incompatible"
+					fi
+				fi
+				if [ -n "$JAVA_COMP_OSARCH" ] ; then
+					debug " checking osarch = {$osarch}, {$JAVA_COMP_OSARCH}"
+					subs=`echo "$osarch" | sed "s/${JAVA_COMP_OSARCH}//"`
+					
+					if [ `ifEquals "$subs" "$osarch"` -eq 1 ]  ; then
+						comp=0
+						debug "... osarch incompatible"
+					fi
+				fi
+				if [ $comp -eq 1 ] ; then
+				        LAUNCHER_JAVA_EXE="$javaExe"
+					LAUNCHER_JAVA="$java"
+					verifyResult=$VERIFY_OK
+		    		fi
+				debug "       compatible = [$comp]"
+				javaCompCounter=`expr "$javaCompCounter" + 1`
+			done
+		    fi		    
+		fi		
+            fi	    
+        done
+   fi
+}
+
+checkFreeSpace() {
+	size="$1"
+	path="$2"
+
+	if [ ! -d "$path" ] && [ ! $isSymlink "$path" ] ; then
+		# if checking path is not an existing directory - check its parent dir
+		path=`dirname "$path"`
+	fi
+
+	diskSpaceCheck=0
+
+	if [ 0 -eq $PERFORM_FREE_SPACE_CHECK ] ; then
+		diskSpaceCheck=1
+	else
+		# get size of the atomic entry (directory)
+		freeSpaceDirCheck="$path"/freeSpaceCheckDir
+		debug "Checking space in $path (size = $size)"
+		mkdir -p "$freeSpaceDirCheck"
+		# POSIX compatible du return size in 1024 blocks
+		du --block-size=$DEFAULT_DISK_BLOCK_SIZE "$freeSpaceDirCheck" 1>/dev/null 2>&1
+		
+		if [ $? -eq 0 ] ; then 
+			debug "    getting POSIX du with 512 bytes blocks"
+			atomicBlock=`du --block-size=$DEFAULT_DISK_BLOCK_SIZE "$freeSpaceDirCheck" | awk ' { print $A }' A=1 2>/dev/null` 
+		else
+			debug "    getting du with default-size blocks"
+			atomicBlock=`du "$freeSpaceDirCheck" | awk ' { print $A }' A=1 2>/dev/null` 
+		fi
+		rm -rf "$freeSpaceDirCheck"
+	        debug "    atomic block size : [$atomicBlock]"
+
+                isBlockNumber=`ifNumber "$atomicBlock"`
+		if [ 0 -eq $isBlockNumber ] ; then
+			out "Can\`t get disk block size"
+			exitProgram $ERROR_INPUTOUPUT
+		fi
+		requiredBlocks=`expr \( "$1" / $DEFAULT_DISK_BLOCK_SIZE \) + $atomicBlock` 1>/dev/null 2>&1
+		if [ `ifNumber $1` -eq 0 ] ; then 
+		        out "Can\`t calculate required blocks size"
+			exitProgram $ERROR_INPUTOUPUT
+		fi
+		# get free block size
+		column=4
+		df -P --block-size="$DEFAULT_DISK_BLOCK_SIZE" "$path" 1>/dev/null 2>&1
+		if [ $? -eq 0 ] ; then 
+			# gnu df, use POSIX output
+			 debug "    getting GNU POSIX df with specified block size $DEFAULT_DISK_BLOCK_SIZE"
+			 availableBlocks=`df -P --block-size="$DEFAULT_DISK_BLOCK_SIZE"  "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
+		else 
+			# try POSIX output
+			df -P "$path" 1>/dev/null 2>&1
+			if [ $? -eq 0 ] ; then 
+				 debug "    getting POSIX df with 512 bytes blocks"
+				 availableBlocks=`df -P "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
+			# try  Solaris df from xpg4
+			elif  [ -x /usr/xpg4/bin/df ] ; then 
+				 debug "    getting xpg4 df with default-size blocks"
+				 availableBlocks=`/usr/xpg4/bin/df -P "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
+			# last chance to get free space
+			else		
+				 debug "    getting df with default-size blocks"
+				 availableBlocks=`df "$path" | sed "1d" | awk ' { print $A }' A=$column 2>/dev/null`
+			fi
+		fi
+		debug "    available blocks : [$availableBlocks]"
+		if [ `ifNumber "$availableBlocks"` -eq 0 ] ; then
+			out "Can\`t get the number of the available blocks on the system"
+			exitProgram $ERROR_INPUTOUTPUT
+		fi
+		
+		# compare
+                debug "    required  blocks : [$requiredBlocks]"
+
+		if [ $availableBlocks -gt $requiredBlocks ] ; then
+			debug "... disk space check OK"
+			diskSpaceCheck=1
+		else 
+		        debug "... disk space check FAILED"
+		fi
+	fi
+	if [ 0 -eq $diskSpaceCheck ] ; then
+		mbDownSize=`expr "$size" / 1024 / 1024`
+		mbUpSize=`expr "$size" / 1024 / 1024 + 1`
+		mbSize=`expr "$mbDownSize" \* 1024 \* 1024`
+		if [ $size -ne $mbSize ] ; then	
+			mbSize="$mbUpSize"
+		else
+			mbSize="$mbDownSize"
+		fi
+		
+		message "$MSG_ERROR_FREESPACE" "$mbSize" "$ARG_TEMPDIR"	
+		exitProgram $ERROR_FREESPACE
+	fi
+}
+
+prepareClasspath() {
+    debug "Processing external jars ..."
+    processJarsClasspath
+ 
+    LAUNCHER_CLASSPATH=""
+    if [ -n "$JARS_CLASSPATH" ] ; then
+		if [ -z "$LAUNCHER_CLASSPATH" ] ; then
+			LAUNCHER_CLASSPATH="$JARS_CLASSPATH"
+		else
+			LAUNCHER_CLASSPATH="$LAUNCHER_CLASSPATH":"$JARS_CLASSPATH"
+		fi
+    fi
+
+    if [ -n "$PREPEND_CP" ] ; then
+	debug "Appending classpath with [$PREPEND_CP]"
+	PREPEND_CP=`resolveString "$PREPEND_CP"`
+
+	if [ -z "$LAUNCHER_CLASSPATH" ] ; then
+		LAUNCHER_CLASSPATH="$PREPEND_CP"		
+	else
+		LAUNCHER_CLASSPATH="$PREPEND_CP":"$LAUNCHER_CLASSPATH"	
+	fi
+    fi
+    if [ -n "$APPEND_CP" ] ; then
+	debug "Appending classpath with [$APPEND_CP]"
+	APPEND_CP=`resolveString "$APPEND_CP"`
+	if [ -z "$LAUNCHER_CLASSPATH" ] ; then
+		LAUNCHER_CLASSPATH="$APPEND_CP"	
+	else
+		LAUNCHER_CLASSPATH="$LAUNCHER_CLASSPATH":"$APPEND_CP"	
+	fi
+    fi
+    debug "Launcher Classpath : $LAUNCHER_CLASSPATH"
+}
+
+resolvePropertyStrings() {
+	args="$1"
+	escapeReplacedString="$2"
+	propertyStart=`echo "$args" | sed "s/^.*\\$P{//"`
+	propertyValue=""
+	propertyName=""
+
+	#Resolve i18n strings and properties
+	if [ 0 -eq `ifEquals "$propertyStart" "$args"` ] ; then
+		propertyName=`echo "$propertyStart" |  sed "s/}.*//" 2>/dev/null`
+		if [ -n "$propertyName" ] ; then
+			propertyValue=`getMessage "$propertyName"`
+
+			if [ 0 -eq `ifEquals "$propertyValue" "$propertyName"` ] ; then				
+				propertyName="\$P{$propertyName}"
+				args=`replaceString "$args" "$propertyName" "$propertyValue" "$escapeReplacedString"`
+			fi
+		fi
+	fi
+			
+	echo "$args"
+}
+
+
+resolveLauncherSpecialProperties() {
+	args="$1"
+	escapeReplacedString="$2"
+	propertyValue=""
+	propertyName=""
+	propertyStart=`echo "$args" | sed "s/^.*\\$L{//"`
+
+	
+        if [ 0 -eq `ifEquals "$propertyStart" "$args"` ] ; then
+ 		propertyName=`echo "$propertyStart" |  sed "s/}.*//" 2>/dev/null`
+		
+
+		if [ -n "$propertyName" ] ; then
+			case "$propertyName" in
+		        	"nbi.launcher.tmp.dir")                        		
+					propertyValue="$LAUNCHER_EXTRACT_DIR"
+					;;
+				"nbi.launcher.java.home")	
+					propertyValue="$LAUNCHER_JAVA"
+					;;
+				"nbi.launcher.user.home")
+					propertyValue="$HOME"
+					;;
+				"nbi.launcher.parent.dir")
+					propertyValue="$LAUNCHER_DIR"
+					;;
+				*)
+					propertyValue="$propertyName"
+					;;
+			esac
+			if [ 0 -eq `ifEquals "$propertyValue" "$propertyName"` ] ; then				
+				propertyName="\$L{$propertyName}"
+				args=`replaceString "$args" "$propertyName" "$propertyValue" "$escapeReplacedString"`
+			fi      
+		fi
+	fi            
+	echo "$args"
+}
+
+resolveString() {
+ 	args="$1"
+	escapeReplacedString="$2"
+	last="$args"
+	repeat=1
+
+	while [ 1 -eq $repeat ] ; do
+		repeat=1
+		args=`resolvePropertyStrings "$args" "$escapeReplacedString"`
+		args=`resolveLauncherSpecialProperties "$args" "$escapeReplacedString"`		
+		if [ 1 -eq `ifEquals "$last" "$args"` ] ; then
+		    repeat=0
+		fi
+		last="$args"
+	done
+	echo "$args"
+}
+
+replaceString() {
+	initialString="$1"	
+	fromString="$2"
+	toString="$3"
+	if [ -n "$4" ] && [ 0 -eq `ifEquals "$4" "false"` ] ; then
+		toString=`escapeString "$toString"`
+	fi
+	fromString=`echo "$fromString" | sed "s/\\\//\\\\\\\\\//g" 2>/dev/null`
+	toString=`echo "$toString" | sed "s/\\\//\\\\\\\\\//g" 2>/dev/null`
+        replacedString=`echo "$initialString" | sed "s/${fromString}/${toString}/g" 2>/dev/null`        
+	echo "$replacedString"
+}
+
+prepareJVMArguments() {
+    debug "Prepare JVM arguments... "    
+
+    jvmArgCounter=0
+    debug "... resolving string : $LAUNCHER_JVM_ARGUMENTS"
+    LAUNCHER_JVM_ARGUMENTS=`resolveString "$LAUNCHER_JVM_ARGUMENTS" true`
+    debug "... resolved  string :  $LAUNCHER_JVM_ARGUMENTS"
+    while [ $jvmArgCounter -lt $JVM_ARGUMENTS_NUMBER ] ; do		
+	 argumentVar="$""JVM_ARGUMENT_$jvmArgCounter"
+         arg=`eval "echo \"$argumentVar\""`
+	 debug "... jvm argument [$jvmArgCounter] [initial]  : $arg"
+	 arg=`resolveString "$arg"`
+	 debug "... jvm argument [$jvmArgCounter] [resolved] : $arg"
+	 arg=`escapeString "$arg"`
+	 debug "... jvm argument [$jvmArgCounter] [escaped] : $arg"
+	 LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS $arg"	
+ 	 jvmArgCounter=`expr "$jvmArgCounter" + 1`
+    done                
+    if [ ! -z "${DEFAULT_USERDIR_ROOT}" ] ; then
+            debug "DEFAULT_USERDIR_ROOT: $DEFAULT_USERDIR_ROOT"
+            LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS -Dnetbeans.default_userdir_root=\"${DEFAULT_USERDIR_ROOT}\""	
+    fi
+    if [ ! -z "${DEFAULT_CACHEDIR_ROOT}" ] ; then
+            debug "DEFAULT_CACHEDIR_ROOT: $DEFAULT_CACHEDIR_ROOT"
+            LAUNCHER_JVM_ARGUMENTS="$LAUNCHER_JVM_ARGUMENTS -Dnetbeans.default_cachedir_root=\"${DEFAULT_CACHEDIR_ROOT}\""	
+    fi
+
+    debug "Final JVM arguments : $LAUNCHER_JVM_ARGUMENTS"            
+}
+
+prepareAppArguments() {
+    debug "Prepare Application arguments... "    
+
+    appArgCounter=0
+    debug "... resolving string : $LAUNCHER_APP_ARGUMENTS"
+    LAUNCHER_APP_ARGUMENTS=`resolveString "$LAUNCHER_APP_ARGUMENTS" true`
+    debug "... resolved  string :  $LAUNCHER_APP_ARGUMENTS"
+    while [ $appArgCounter -lt $APP_ARGUMENTS_NUMBER ] ; do		
+	 argumentVar="$""APP_ARGUMENT_$appArgCounter"
+         arg=`eval "echo \"$argumentVar\""`
+	 debug "... app argument [$appArgCounter] [initial]  : $arg"
+	 arg=`resolveString "$arg"`
+	 debug "... app argument [$appArgCounter] [resolved] : $arg"
+	 arg=`escapeString "$arg"`
+	 debug "... app argument [$appArgCounter] [escaped] : $arg"
+	 LAUNCHER_APP_ARGUMENTS="$LAUNCHER_APP_ARGUMENTS $arg"	
+ 	 appArgCounter=`expr "$appArgCounter" + 1`
+    done
+    debug "Final application arguments : $LAUNCHER_APP_ARGUMENTS"            
+}
+
+
+runCommand() {
+	cmd="$1"
+	debug "Running command : $cmd"
+	if [ -n "$OUTPUT_FILE" ] ; then
+		#redirect all stdout and stderr from the running application to the file
+		eval "$cmd" >> "$OUTPUT_FILE" 2>&1
+	elif [ 1 -eq $SILENT_MODE ] ; then
+		# on silent mode redirect all out/err to null
+		eval "$cmd" > /dev/null 2>&1	
+	elif [ 0 -eq $USE_DEBUG_OUTPUT ] ; then
+		# redirect all output to null
+		# do not redirect errors there but show them in the shell output
+		eval "$cmd" > /dev/null	
+	else
+		# using debug output to the shell
+		# not a silent mode but a verbose one
+		eval "$cmd"
+	fi
+	return $?
+}
+
+executeMainClass() {
+	prepareClasspath
+	prepareJVMArguments
+	prepareAppArguments
+	debug "Running main jar..."
+	message "$MSG_RUNNING"
+	classpathEscaped=`escapeString "$LAUNCHER_CLASSPATH"`
+	mainClassEscaped=`escapeString "$MAIN_CLASS"`
+	launcherJavaExeEscaped=`escapeString "$LAUNCHER_JAVA_EXE"`
+	tmpdirEscaped=`escapeString "$LAUNCHER_JVM_TEMP_DIR"`
+	
+	command="$launcherJavaExeEscaped $LAUNCHER_JVM_ARGUMENTS -Djava.io.tmpdir=$tmpdirEscaped -classpath $classpathEscaped $mainClassEscaped $LAUNCHER_APP_ARGUMENTS"
+
+	debug "Running command : $command"
+	runCommand "$command"
+	exitCode=$?
+	debug "... java process finished with code $exitCode"
+	exitProgram $exitCode
+}
+
+escapeString() {
+	echo "$1" | sed "s/\\\/\\\\\\\/g;s/\ /\\\\ /g;s/\"/\\\\\"/g;s/(/\\\\\(/g;s/)/\\\\\)/g;" # escape spaces, commas and parentheses
+}
+
+getMessage() {
+        getLocalizedMessage_$LAUNCHER_LOCALE $@
+}
+
+POSSIBLE_JAVA_ENV="JAVA:JAVA_HOME:JAVAHOME:JAVA_PATH:JAVAPATH:JDK:JDK_HOME:JDKHOME:ANT_JAVA:"
+POSSIBLE_JAVA_EXE_SUFFIX_SOLARIS="bin/java:bin/sparcv9/java:"
+POSSIBLE_JAVA_EXE_SUFFIX_COMMON="bin/java:"
diff --git a/launcher/windows/.dep.inc b/launcher/windows/.dep.inc
new file mode 100644
index 0000000..4560e55
--- /dev/null
+++ b/launcher/windows/.dep.inc
@@ -0,0 +1,5 @@
+# This code depends on make tool being used
+DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES}))
+ifneq (${DEPFILES},)
+include ${DEPFILES}
+endif
diff --git a/launcher/windows/Makefile b/launcher/windows/Makefile
new file mode 100644
index 0000000..2327cb7
--- /dev/null
+++ b/launcher/windows/Makefile
@@ -0,0 +1,129 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+#
+#  There exist several targets which are by default empty and which can be 
+#  used for execution of your targets. These targets are usually executed 
+#  before and after some main targets. They are: 
+#
+#     .build-pre:              called before 'build' target
+#     .build-post:             called after 'build' target
+#     .clean-pre:              called before 'clean' target
+#     .clean-post:             called after 'clean' target
+#     .clobber-pre:            called before 'clobber' target
+#     .clobber-post:           called after 'clobber' target
+#     .all-pre:                called before 'all' target
+#     .all-post:               called after 'all' target
+#     .help-pre:                called before 'help' target
+#     .help-post:               called after 'help' target
+#
+#  Targets beginning with '.' are not intended to be called on their own.
+#
+#  Main targets can be executed directly, and they are:
+#  
+#     build                    build a specific configuration
+#     clean                    remove built files from a configuration
+#     clobber                  remove all built files
+#     all                      build all configurations
+#     help                     print help mesage
+#  
+#  Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+#  .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+
+# Environment 
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+RESCOMP=windres
+
+
+# build
+build: .build-pre .build-impl .build-post
+
+.build-pre:
+	mkdir -p build
+	windres -I resources -o  build/icon.o -i resources/res.rc
+
+.build-post:
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-pre .clean-impl .clean-post
+
+.clean-pre:
+	rm -rf build/icon.o
+
+.clean-post:
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-pre .clobber-impl .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post:
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-pre .all-impl .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post:
+# Add your post 'all' code here...
+
+
+# help
+help: .help-pre .help-impl .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post:
+# Add your post 'help' code here...
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
diff --git a/launcher/windows/Makefile-vc b/launcher/windows/Makefile-vc
new file mode 100644
index 0000000..78bc631
--- /dev/null
+++ b/launcher/windows/Makefile-vc
@@ -0,0 +1,92 @@
+#
+#
+
+
+!include <$(PLATFORM_SDK)/include/win32.mak>
+
+# define the compiler and linker for all the platforms
+CC32="$(VC_2005)\Bin\cl.exe"
+L32="$(VC_2005)\Bin\link.exe"
+MT32="$(PLATFORM_SDK)\Bin\mt.exe"
+RC32="$(VC_2005)\Bin\rc.exe"
+
+BUILD_DIR32=.\build\32bit
+OUTPUT_FILE32=.\dist\nlw.exe
+MANIFEST_FILE32=.\resources\nlw.exe.manifest
+#Alternative manifest file - read more in resources\res.rc
+#MANIFEST_FILE32=.\resources\nlw-alt.exe.manifest
+
+SOURCE_FILES=\
+	.\src\ExtractUtils.c \
+	.\src\FileUtils.c \
+	.\src\JavaUtils.c \
+	.\src\Launcher.c \
+	.\src\Main.c \
+	.\src\ProcessUtils.c \
+	.\src\RegistryUtils.c \
+	.\src\StringUtils.c \
+	.\src\SystemUtils.c
+
+
+CC32_OPTS=/O1 /Os \
+	/I "$(VC_2005)\include" \
+	/D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" \
+	/FD /EHsc /MT \
+	/Fo"$(BUILD_DIR32)\\"  /Fd"$(BUILD_DIR32)\vc80.pdb" \
+	/W3 /nologo /c /Wp64 /TC /errorReport:prompt
+
+LINKING_LIBRARIES=\
+	user32.lib\
+	gdi32.lib \
+	comdlg32.lib \
+	comctl32.lib \
+	advapi32.lib\
+	shell32.lib \
+	ole32.lib \
+	oleaut32.lib \
+	userenv.lib \
+	libcmt.lib \
+	kernel32.lib
+
+L32_OPTS=\
+	/OUT:$(OUTPUT_FILE32) \
+	/INCREMENTAL:NO \
+	/LIBPATH:"$(PLATFORM_SDK)\Lib" \
+	/MANIFEST \
+	/MANIFESTFILE:"$(BUILD_DIR32)\nlw.exe.intermediate.manifest" \
+	/NODEFAULTLIB \
+	/SUBSYSTEM:WINDOWS \
+	/OPT:REF /OPT:ICF \
+	/MACHINE:X86 \
+	/ERRORREPORT:PROMPT \
+	$(LINKING_LIBRARIES)
+
+	
+RC32_OPTS=\
+	/I ".\resources" /fo $(BUILD_DIR32)\resources.obj
+	
+
+all: init build-32
+
+clean:
+  
+
+init:
+  - md $(BUILD_DIR32)
+  - md .\dist
+
+  del /Q /S $(BUILD_DIR32)
+  del /Q  $(OUTPUT_FILE32)  
+
+build-32: 
+  Set CPU=i386
+  Set Lib=%VC_2005%\Lib;%PLATFORM_SDK%\Lib;%Lib%
+  Set Include=%PLATFORM_SDK%\Include;%Include%
+  Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
+  Set APPVER=5.01
+  Set TARGETOS=WINNT
+  
+  $(CC32) $(CC32_OPTS) $(SOURCE_FILES)
+  $(RC32) $(RC32_OPTS) resources/res.rc
+  $(L32) $(L32_OPTS) $(BUILD_DIR32)\ExtractUtils.obj $(BUILD_DIR32)\FileUtils.obj $(BUILD_DIR32)\JavaUtils.obj $(BUILD_DIR32)\Launcher.obj $(BUILD_DIR32)\Main.obj $(BUILD_DIR32)\ProcessUtils.obj $(BUILD_DIR32)\RegistryUtils.obj $(BUILD_DIR32)\StringUtils.obj $(BUILD_DIR32)\SystemUtils.obj $(BUILD_DIR32)\resources.obj
+  $(MT32)  /outputresource:"$(OUTPUT_FILE32);#1" -manifest $(MANIFEST_FILE32) $(BUILD_DIR32)\nlw.exe.intermediate.manifest
diff --git a/launcher/windows/Makefile-vc-wo-crt b/launcher/windows/Makefile-vc-wo-crt
new file mode 100644
index 0000000..6a693f5
--- /dev/null
+++ b/launcher/windows/Makefile-vc-wo-crt
@@ -0,0 +1,92 @@
+#
+#
+
+
+!include <$(PLATFORM_SDK)/include/win32.mak>
+
+# define the compiler and linker for all the platforms
+CC32="$(VC_2005)\Bin\cl.exe"
+L32="$(VC_2005)\Bin\link.exe"
+MT32="$(PLATFORM_SDK)\Bin\mt.exe"
+RC32="$(VC_2005)\Bin\rc.exe"
+
+BUILD_DIR32=.\build\32bit
+OUTPUT_FILE32=.\dist\nlw.exe
+MANIFEST_FILE32=.\resources\nlw.exe.manifest
+#Alternative manifest file - read more in resources\res.rc
+#MANIFEST_FILE32=.\resources\nlw-alt.exe.manifest
+
+SOURCE_FILES=\
+	.\src\ExtractUtils.c \
+	.\src\FileUtils.c \
+	.\src\JavaUtils.c \
+	.\src\Launcher.c \
+	.\src\Main.c \
+	.\src\ProcessUtils.c \
+	.\src\RegistryUtils.c \
+	.\src\StringUtils.c \
+	.\src\SystemUtils.c
+
+
+CC32_OPTS=/O1 /Os \
+	/I "$(VC_2005)\include" \
+	/D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" \
+	/FD /EHsc /GS- \
+	/Fo"$(BUILD_DIR32)\\"  /Fd"$(BUILD_DIR32)\vc80.pdb" \
+	/W3 /nologo /c /Wp64 /TC /errorReport:prompt
+
+LINKING_LIBRARIES=\
+	user32.lib\
+	gdi32.lib \
+	comdlg32.lib \
+	comctl32.lib \
+	advapi32.lib\
+	shell32.lib \
+	ole32.lib \
+	oleaut32.lib \
+	userenv.lib \
+	kernel32.lib \
+
+L32_OPTS=\
+	/OUT:$(OUTPUT_FILE32) \
+	/INCREMENTAL:NO \
+	/LIBPATH:"$(PLATFORM_SDK)\Lib" \
+	/MANIFEST \
+	/MANIFESTFILE:"$(BUILD_DIR32)\nlw.exe.intermediate.manifest" \
+	/NODEFAULTLIB \
+	/SUBSYSTEM:WINDOWS \
+	/OPT:REF /OPT:ICF \
+	/MACHINE:X86 \
+	/ERRORREPORT:PROMPT \
+        /ENTRY:MyMain \
+	$(LINKING_LIBRARIES)
+
+	
+RC32_OPTS=\
+	/I ".\resources" /fo $(BUILD_DIR32)\resources.obj
+	
+
+all: init build-32
+
+clean:
+  
+
+init:
+  - md $(BUILD_DIR32)
+  - md .\dist
+
+  del /Q /S $(BUILD_DIR32)
+  del /Q  $(OUTPUT_FILE32)  
+
+build-32: 
+  Set CPU=i386
+  Set Lib=%VC_2005%\Lib;%PLATFORM_SDK%\Lib;%Lib%
+  Set Include=%PLATFORM_SDK%\Include;%Include%
+  Set Path=%PLATFORM_SDK%\Bin;%PLATFORM_SDK%\Bin\WinNT;%VC_2005_PATH%;%path%
+  Set APPVER=5.01
+  Set TARGETOS=WINNT
+  
+  $(CC32) $(CC32_OPTS) $(SOURCE_FILES)
+  $(RC32) $(RC32_OPTS) resources/res.rc
+  $(L32) $(L32_OPTS) $(BUILD_DIR32)\ExtractUtils.obj $(BUILD_DIR32)\FileUtils.obj $(BUILD_DIR32)\JavaUtils.obj $(BUILD_DIR32)\Launcher.obj $(BUILD_DIR32)\Main.obj $(BUILD_DIR32)\ProcessUtils.obj $(BUILD_DIR32)\RegistryUtils.obj $(BUILD_DIR32)\StringUtils.obj $(BUILD_DIR32)\SystemUtils.obj $(BUILD_DIR32)\resources.obj
+  $(MT32)  /outputresource:"$(OUTPUT_FILE32);#1" -manifest $(MANIFEST_FILE32) $(BUILD_DIR32)\nlw.exe.intermediate.manifest
diff --git a/launcher/windows/i18n/launcher.properties b/launcher/windows/i18n/launcher.properties
new file mode 100644
index 0000000..c9de214
--- /dev/null
+++ b/launcher/windows/i18n/launcher.properties
@@ -0,0 +1,74 @@
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
+nlw.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 8 or newer is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again. You can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads
+nlw.jvm.usererror=Java Runtime Environment (JRE) was not found\nThere is no JRE at the specified location {0}
+nlw.jvm.unsupportedversion=Unsupported Java VM version\nThe Java VM at {0} has the unsupported version
+nlw.freespace=There is not enough free disk space to extract installation data\n{0} MB of free disk space is required in a temporary folder. Clean up the disk space and run installer again. You can specify a temporary folder with sufficient disk space using {1} installer argument
+nlw.tmpdir=Can't create temporary directory\nThe temporary directory for extracting data {0} was not created
+nlw.integrity=Installer file is corrupted\nInstaller file {0} seems to be corrupted
+nlw.output.error=Data extraction error\nCan't create file {0}!\nThe following error occured :\n{1}
+nlw.java.process.error=An error occured while running java process\n{0}
+nlw.missing.external.resource=Can`t run NetBeans Installer.\nAn external file with necessary data is required but missing:\n{0}
+nlw.bundled.jvm.extract.error=Cannot prepare bundled JVM to run the installer.\nMost probably the bundled JVM is not compatible with the current platform.
+nlw.bundled.jvm.verify.error=An error occured while verifying bundled JVM.\nMost probably the bundled JVM is not compatible with the current platform.
+
+nlw.arg.output={0} <output-file>\n\tRedirect output to file <output-file>
+nlw.arg.javahome={0} <javahomedir>\n\tRun jar file using JVM from <javahomedir>
+nlw.arg.verbose={0}\n\tUse verbose output
+nlw.arg.tempdir={0} <temp-dir>\n\tUse <temp-dir> for extracting data
+nlw.arg.extract={0} [directory]\n\tExtract all bundled data to the specific directory.\n\tIf directory is not specified then extract to the current directory
+nlw.arg.classpatha={0} <classpath>\n\tAppend classpath with <classpath>
+nlw.arg.classpathp={0} <classpath>\n\tPrepend classpath with <classpath>
+nlw.arg.disable.space.check={0}\n\tDisable free space check
+nlw.arg.locale={0} <locale>\n\tOverride system default locale with <locale>
+nlw.arg.silent={0} \n\tRun installer silently
+nlw.arg.help={0}\n\tShow help message
+
+
+nlw.msg.create.tmpdir=Creating temporary directory ...
+nlw.msg.extract=Extracting data ...
+nlw.msg.jvmsearch=Finding JVM on your system ...
+nlw.msg.setoptions=Setting command options ...
+nlw.msg.running=Running JVM ...
+nlw.msg.title=Please wait while the launcher prepares data to run the installer ...
+nlw.msg.messagebox.title=NetBeans IDE Installer
+nlw.msg.progress.title=Configuring the installer ...
+nlw.msg.button.error=Exit Installer
+nlw.msg.main.title=NetBeans IDE Installer
diff --git a/launcher/windows/nbproject/configurations.xml b/launcher/windows/nbproject/configurations.xml
new file mode 100644
index 0000000..a969ca9
--- /dev/null
+++ b/launcher/windows/nbproject/configurations.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+Copyright (c) 2007, 2016 Oracle and/or its affiliates. All rights reserved.
+
+Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+Other names may be trademarks of their respective owners.
+
+The contents of this file are subject to the terms of either the GNU
+General Public License Version 2 only ("GPL") or the Common
+Development and Distribution License("CDDL") (collectively, the
+"License"). You may not use this file except in compliance with the
+License. You can obtain a copy of the License at
+http://www.netbeans.org/cddl-gplv2.html
+or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+specific language governing permissions and limitations under the
+License.  When distributing the software, include this License Header
+Notice in each file and include the License file at
+nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the GPL Version 2 section of the License file that
+accompanied this code. If applicable, add the following below the
+License Header, with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+If you wish your version of this file to be governed by only the CDDL
+or only the GPL Version 2, indicate your decision by adding
+"[Contributor] elects to include this software in this distribution
+under the [CDDL or GPL Version 2] license." If you do not indicate a
+single choice of license, a recipient has the option to distribute
+your version of this file under either the CDDL, the GPL Version 2 or
+to extend the choice of license to its licensees as provided above.
+However, if you add GPL Version 2 code and therefore, elected the GPL
+Version 2 license, then the option applies only if the new code is
+made subject to such option by the copyright holder.
+
+Contributor(s):
+-->
+<configurationDescriptor version="84">
+  <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
+    <logicalFolder name="HeaderFiles"
+                   displayName="Header Files"
+                   projectFiles="true">
+      <itemPath>src/Errors.h</itemPath>
+      <itemPath>src/ExtractUtils.h</itemPath>
+      <itemPath>src/FileUtils.h</itemPath>
+      <itemPath>src/JavaUtils.h</itemPath>
+      <itemPath>src/Launcher.h</itemPath>
+      <itemPath>src/Main.h</itemPath>
+      <itemPath>src/ProcessUtils.h</itemPath>
+      <itemPath>src/RegistryUtils.h</itemPath>
+      <itemPath>src/StringUtils.h</itemPath>
+      <itemPath>src/SystemUtils.h</itemPath>
+      <itemPath>src/Types.h</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ResourceFiles"
+                   displayName="Resource Files"
+                   projectFiles="true">
+      <itemPath>resources/res.rc</itemPath>
+    </logicalFolder>
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>src/ExtractUtils.c</itemPath>
+      <itemPath>src/FileUtils.c</itemPath>
+      <itemPath>src/JavaUtils.c</itemPath>
+      <itemPath>src/Launcher.c</itemPath>
+      <itemPath>src/Main.c</itemPath>
+      <itemPath>src/ProcessUtils.c</itemPath>
+      <itemPath>src/RegistryUtils.c</itemPath>
+      <itemPath>src/StringUtils.c</itemPath>
+      <itemPath>src/SystemUtils.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <projectmakefile>Makefile</projectmakefile>
+  <confs>
+    <conf name="Debug" type="1">
+      <toolsSet>
+        <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>
+        <compilerSet>Cygwin|Cygwin</compilerSet>
+      </toolsSet>
+      <compileType>
+        <cTool>
+          <stripSymbols>true</stripSymbols>
+          <commandLine>-mno-cygwin</commandLine>
+          <warningLevel>3</warningLevel>
+        </cTool>
+        <ccTool>
+          <stripSymbols>true</stripSymbols>
+        </ccTool>
+        <linkerTool>
+          <output>dist/nlw</output>
+          <stripSymbols>true</stripSymbols>
+          <linkerLibItems>
+            <linkerOptionItem>-lole32 -luuid -lkernel32 -lcomctl32 -luserenv</linkerOptionItem>
+          </linkerLibItems>
+          <commandLine>-mwindows -mno-cygwin build/icon.o</commandLine>
+        </linkerTool>
+      </compileType>
+    </conf>
+    <conf name="Release" type="1">
+      <toolsSet>
+        <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>
+        <compilerSet>Cygwin|Cygwin</compilerSet>
+      </toolsSet>
+      <compileType>
+        <cTool>
+          <developmentMode>5</developmentMode>
+        </cTool>
+        <ccTool>
+          <developmentMode>5</developmentMode>
+        </ccTool>
+        <fortranCompilerTool>
+          <developmentMode>5</developmentMode>
+        </fortranCompilerTool>
+      </compileType>
+    </conf>
+  </confs>
+</configurationDescriptor>
diff --git a/launcher/windows/nbproject/project.properties b/launcher/windows/nbproject/project.properties
new file mode 100644
index 0000000..75bafc2
--- /dev/null
+++ b/launcher/windows/nbproject/project.properties
@@ -0,0 +1,40 @@
+
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU General Public
+# License Version 2 only ("GPL") or the Common Development and Distribution
+# License("CDDL") (collectively, the "License"). You may not use this file except in
+# compliance with the License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+# License for the specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header Notice in
+# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+# designates this particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+# If applicable, add the following below the License Header, with the fields enclosed
+# by brackets [] replaced by your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+# 
+# Contributor(s):
+# 
+# The Original Software is NetBeans. The Initial Developer of the Original Software
+# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+# Rights Reserved.
+# 
+# If you wish your version of this file to be governed by only the CDDL or only the
+# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+# this software in this distribution under the [CDDL or GPL Version 2] license." If
+# you do not indicate a single choice of license, a recipient has the option to
+# distribute your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above. However, if you
+# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+# option applies only if the new code is made subject to such option by the copyright
+# holder.
+# 
+
diff --git a/launcher/windows/nbproject/project.xml b/launcher/windows/nbproject/project.xml
new file mode 100644
index 0000000..d3ace8f
--- /dev/null
+++ b/launcher/windows/nbproject/project.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+  Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
+
+  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+  Other names may be trademarks of their respective owners.
+
+  The contents of this file are subject to the terms of either the GNU General Public
+  License Version 2 only ("GPL") or the Common Development and Distribution
+  License("CDDL") (collectively, the "License"). You may not use this file except in
+  compliance with the License. You can obtain a copy of the License at
+  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+  License for the specific language governing permissions and limitations under the
+  License.  When distributing the software, include this License Header Notice in
+  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+  designates this particular file as subject to the "Classpath" exception as provided
+  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
+  If applicable, add the following below the License Header, with the fields enclosed
+  by brackets [] replaced by your own identifying information:
+  "Portions Copyrighted [year] [name of copyright owner]"
+  
+  Contributor(s):
+  
+  The Original Software is NetBeans. The Initial Developer of the Original Software
+  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+  Rights Reserved.
+  
+  If you wish your version of this file to be governed by only the CDDL or only the
+  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+  this software in this distribution under the [CDDL or GPL Version 2] license." If
+  you do not indicate a single choice of license, a recipient has the option to
+  distribute your version of this file under either the CDDL, the GPL Version 2 or
+  to extend the choice of license to its licensees as provided above. However, if you
+  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
+  option applies only if the new code is made subject to such option by the copyright
+  holder.
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.cnd.makeproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/make-project/1">
+            <name>NBI Native Launcher : Windows</name>
+            <make-project-type>0</make-project-type>
+            <c-extensions>c</c-extensions>
+            <cpp-extensions/>
+            <header-extensions>h</header-extensions>
+            <sourceEncoding>UTF-8</sourceEncoding>
+            <make-dep-projects/>
+            <sourceRootList/>
+            <confList>
+                <confElem>
+                    <name>Debug</name>
+                    <type>1</type>
+                </confElem>
+                <confElem>
+                    <name>Release</name>
+                    <type>1</type>
+                </confElem>
+            </confList>
+        </data>
+    </configuration>
+</project>
diff --git a/launcher/windows/resources/icon.ico b/launcher/windows/resources/icon.ico
new file mode 100644
index 0000000..e730c4a
Binary files /dev/null and b/launcher/windows/resources/icon.ico differ
diff --git a/launcher/windows/resources/nlw-alt.exe.manifest b/launcher/windows/resources/nlw-alt.exe.manifest
new file mode 100644
index 0000000..8821bdc
--- /dev/null
+++ b/launcher/windows/resources/nlw-alt.exe.manifest
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
+   <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="nlw" type="win32"/>
+      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+      <security>
+         <requestedPrivileges>
+            <requestedExecutionLevel level="asInvoker"/> 
+         </requestedPrivileges>
+      </security>
+   </trustInfo>
+</assembly>
\ No newline at end of file
diff --git a/launcher/windows/resources/nlw.exe.manifest b/launcher/windows/resources/nlw.exe.manifest
new file mode 100644
index 0000000..c3fabc1
--- /dev/null
+++ b/launcher/windows/resources/nlw.exe.manifest
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
+   <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="nlw" type="win32"/>
+      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+      <security>
+         <requestedPrivileges>
+            <requestedExecutionLevel level="requireAdministrator"/> 
+         </requestedPrivileges>
+      </security>
+   </trustInfo>
+</assembly>
\ No newline at end of file
diff --git a/launcher/windows/resources/res.rc b/launcher/windows/resources/res.rc
new file mode 100644
index 0000000..02860db
--- /dev/null
+++ b/launcher/windows/resources/res.rc
@@ -0,0 +1,61 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2007 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ */
+
+
+// Uncomment the following lines to add special "Vista" manifest under Cygwin using GCC and WINDRES
+// Seems that tools from MS Platform SDK/MS VS C++ 2005 EE (C compiler, resource compiler and manifest tool) ignore that
+// (so you can leave that uncommented for both tools at once) but I haven`t check that much.
+// PS. Currently uncommented - seems to be working with GCC compiler (checked by Martin Sladecek)
+#define RT_MANIFEST  24
+#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
+
+
+// Using of nlw.exe.manifest means that on Vista every installer/uninstaller (launcher, in general) invocation would require admin privileges which user would be asked for (evaluation dialog). 
+// In that case the executable icon would have "shield" mark.
+// Using of nlw-alt.exe.manifest means that on Vista evaluation dialog is not displayed. To run it with admin right user have to execute "Run as Administrator" explicitely.
+// Without the build-it manifest the following issue can occur (reported Martin Sladecek):
+// When launcher would have "instal" in its name (uninstall.exe for instance), then - due to UAC and it`s method of checking "installer-like" names and code stamps - it would be executed with Administrator`s environment - it is would be different from the user that performed the installation.
+// Only one of the following lines should be commented, the other one should be uncommented.
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "nlw.exe.manifest"
+//CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "nlw-alt.exe.manifest"
+
+100 ICON DISCARDABLE "icon.ico"
+
diff --git a/launcher/windows/src/Errors.h b/launcher/windows/src/Errors.h
new file mode 100644
index 0000000..ae89fa1
--- /dev/null
+++ b/launcher/windows/src/Errors.h
@@ -0,0 +1,72 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * Contributor(s):
+ * 
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ * 
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#ifndef _Errors_H
+#define	_Errors_H
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+    
+#define ERROR_OK                            0
+#define ERROR_INTEGRITY                     1000
+#define ERROR_FREESPACE                     1001
+#define ERROR_INPUTOUPUT                    1002
+#define ERROR_JVM_UNCOMPATIBLE              1003
+#define ERROR_JVM_NOT_FOUND                 1004
+#define ERROR_ON_EXECUTE_PROCESS            1005
+#define ERROR_PROCESS_TIMEOUT               1006
+#define ERROR_USER_TERMINATED               1007
+#define EXTERNAL_RESOURCE_MISSING           1008
+#define ERROR_BUNDLED_JVM_EXTRACTION        1009
+#define ERROR_BUNDLED_JVM_VERIFICATION      1010
+    
+#define EXIT_CODE_EVENTS_INITIALIZATION_ERROR 1022
+#define EXIT_CODE_GUI_INITIALIZATION_ERROR  1023
+#define EXIT_CODE_STUB                      1024
+#define EXIT_CODE_SYSTEM_ERROR              1025
+
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _Errors_H */
+
diff --git a/launcher/windows/src/ExtractUtils.c b/launcher/windows/src/ExtractUtils.c
new file mode 100644
index 0000000..2ca6e5a
--- /dev/null
+++ b/launcher/windows/src/ExtractUtils.c
@@ -0,0 +1,781 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+ * Other names may be trademarks of their respective owners.
+ *
+ * The contents of this file are subject to the terms of either the GNU General
+ * Public License Version 2 only ("GPL") or the Common Development and Distribution
+ * License("CDDL") (collectively, the "License"). You may not use this file except in
+ * compliance with the License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
+ * License for the specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header Notice in
+ * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
+ * designates this particular file as subject to the "Classpath" exception as
+ * provided by Oracle in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the License Header,
+ * with the fields enclosed by brackets [] replaced by your own identifying
+ * information: "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * Contributor(s):
+ *
+ * The Original Software is NetBeans. The Initial Developer of the Original Software
+ * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
+ * Rights Reserved.
+ *
+ * If you wish your version of this file to be governed by only the CDDL or only the
+ * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
+ * this software in this distribution under the [CDDL or GPL Version 2] license." If
+ * you do not indicate a single choice of license, a recipient has the option to
+ * distribute your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above. However, if
+ * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
+ * the option applies only if the new code is made subject to such option by the
+ * copyright holder.
+ */
+
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include "FileUtils.h"
+#include "StringUtils.h"
+#include "SystemUtils.h"
+#include "JavaUtils.h"
+#include "RegistryUtils.h"
+#include "ExtractUtils.h"
+#include "Launcher.h"
+#include "Main.h"
+
+const DWORD   STUB_FILL_SIZE      = 450000;
+
+void skipLauncherStub(LauncherProperties * props,  DWORD stubSize) {
+    HANDLE hFileRead = props->handler;
+    
+    if(hFileRead!=INVALID_HANDLE_VALUE) {
+        // just read stub data.. no need to write it anywhere
+        DWORD read = 0;
+        char * offsetbuf = newpChar(stubSize);
+        DWORD sizeLeft = stubSize;
+        while(ReadFile(hFileRead, offsetbuf, sizeLeft, &read, 0) && sizeLeft && read) {
+            sizeLeft-=read;
+            addProgressPosition(props, read);
+            if(sizeLeft==0) break;
+            if(read==0) { // we need some more bytes to read but we can`t to read
+                props->status = ERROR_INTEGRITY;
+                break;
+            }
+        }
+        FREE(offsetbuf);
+    }
+}
+
+
+void skipStub(LauncherProperties * props) {
+    if(props->isOnlyStub) {
+        WCHAR * os;
+        props->status = EXIT_CODE_STUB;        
+        os = appendStringW(NULL, L"It`s only the launcher stub.\nOS: ");
+        if(is9x()) os = appendStringW(os, L"Windows 9x");
+        if(isNT()) os = appendStringW(os, L"Windows NT");
+        if(is2k()) os = appendStringW(os, L"Windows 2000");
+        if(isXP()) os = appendStringW(os, L"Windows XP");
+        if(is2003())  os = appendStringW(os, L"Windows 2003");
+        if(isVista()) os = appendStringW(os, L"Windows Vista");
+        if(is2008())  os = appendStringW(os, L"Windows 2008");
+        if(is7())     os = appendStringW(os, L"Windows 7");
+	if(IsWow64) os = appendStringW(os, L" x64");
+        showMessageW(props,  os , 0);
+	FREE(os);
+    } else {
+        skipLauncherStub(props, STUB_FILL_SIZE);
+        if(!isOK(props)) {
+            writeMessageA(props, OUTPUT_LEVEL_NORMAL, 1,
+                    "Error! Can`t process launcher stub", 1);
+            showErrorW(props, INTEGRITY_ERROR_PROP, 1, props->exeName);
+        }
+    }
+}
+
+void modifyRestBytes(SizedString* rest, DWORD start) {
+    
+    DWORD len = rest->length - start;
+    char * restBytesNew = NULL;
+    
+    if(len>0) {
+        DWORD i;
+        restBytesNew = newpChar(len);
+        for(i=start;i<rest->length;i++) {
+            restBytesNew[i-start] = (rest->bytes) [i];
+        }
+    }
+    FREE(rest->bytes);
+    rest->bytes = restBytesNew;
+    rest->length = len;
+}
+
+DWORD readStringFromBuf(SizedString *rest, SizedString * result, DWORD isUnicode) {
+    if((rest->length)!=0) {
+        // we have smth in the restBytes that we have read but haven`t yet proceeded
+        DWORD i=0;
+        for(i=0;i<rest->length;i++) {
+            DWORD check = ((rest->bytes)[i]==0);
+            if(isUnicode) {
+                if ( (i/2)*2==i) {// i is even
+                    check = check && (i < rest->length-1 && ((rest->bytes)[i+1]==0));
+                } else {
+                    check = 0;
+                }
+            }
+            if( check ) { // we have found null character in the rest bytes
+                result->bytes = appendStringN(NULL, 0, rest->bytes, i);
+                result->length = i;
+                modifyRestBytes(rest, i + 1 + isUnicode);
+                return ERROR_OK;
+            }
+        }
+        //here we have found no \0 character in the rest of bytes...
+    }
+    return ERROR_INPUTOUPUT;
+}
+
+void readString(LauncherProperties * props, SizedString * result, DWORD isUnicode) {
+    DWORD * status = & props->status;
+    HANDLE hFileRead = props->handler;
+    SizedString * rest = props->restOfBytes;
+    DWORD bufferSize = props->bufsize;
+    DWORD read=0;
+    char * buf = NULL;
+    
+    if(*status != ERROR_OK ) return;
+    
+    if(readStringFromBuf(rest, result, isUnicode)==ERROR_OK) {
+        return;
+    }
+    
+    //we need to read file for more data to find \0 character...
+    
+    buf = newpChar(bufferSize);
+    
+    while (ReadFile(hFileRead, buf, bufferSize, &read, 0) && read) {
+        addProgressPosition(props, read);
+        rest->bytes = appendStringN(rest->bytes, rest->length, buf, read);
+        rest->length = rest->length + read;
+        if(readStringFromBuf(rest, result, isUnicode)==ERROR_OK) {
+            //if(result->bytes!=NULL) {
+            //we have find \0 character
+            break;
+        }
+        ZERO(buf, sizeof(char) * bufferSize);
+        if(read==0) { // we have nothing to read.. smth wrong
+            *status = ERROR_INTEGRITY;
+            break;
+        }
+    }
+    FREE(buf);
+    return;
+}
+
+
+
+void readNumber(LauncherProperties * props, DWORD * result) {
+    if(isOK(props)) {
+        
+        SizedString * numberString = createSizedString();
+        DWORD i =0;
+        DWORD number = 0;
+        
+        readString(props, numberString, 0);
+        if(!isOK(props)) {
+            freeSizedString(&numberString);
+            writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
+                    "Error!! Can`t read number string. Most probably integrity error.", 1);
+            return;
+        }
+        
+        if(numberString->bytes==NULL) {
+            freeSizedString(&numberString);
+            writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
+                    "Error!! Can`t read number string (it can`t be NULL). Most probably integrity error.", 1);
+            props->status = ERROR_INTEGRITY;
+            return;
+        }
+        
+        
+        for(;i<numberString->length;i++) {
+            char c = numberString->bytes[i];
+            if(c>='0' && c<='9') {
+                number = number * 10 + (c - '0');
+            } else if(c==0) {
+                // we have reached the end of number section
+                writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
+                        "Can`t read number from string (it contains zero character):", 1);
+                writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, numberString->bytes, 1);
+                props->status = ERROR_INTEGRITY;
+                break;
+            } else {
+                // unexpected...
+                writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1,
+                        "Can`t read number from string (unexpected error):", 1);
+                writeMessageA(props, OUTPUT_LEVEL_DEBUG, 1, numberString->bytes, 1);
+                props->status = ERROR_INTEGRITY;
+                break;
+            }
+        }
+        freeSizedString(&numberString);
+        *result = number;
+    }
+}
+
+void readStringWithDebugW(LauncherProperties * props, WCHAR ** dest, char * paramName) {
+    SizedString *sizedStr = createSizedString();
+    if(paramName!=NULL) {
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, paramName, 0);
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
+    }
+    readString(props, sizedStr, 1);
+    if(!isOK(props)) {
+        freeSizedString(&sizedStr);
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
+                "[ERROR] Can`t read string !! Seems to be integrity error", 1);
+        return;
+    }
+    *dest = createWCHAR(sizedStr);
+    freeSizedString(&sizedStr);
+    if(paramName!=NULL) {
+        if((*dest)!=NULL) {
+            writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0,  *dest, 1);
+        } else {
+            writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "NULL", 1);
+        }
+    }
+    return;
+}
+
+void readStringWithDebugA(LauncherProperties * props, char ** dest, char * paramName) {
+    SizedString *sizedStr = createSizedString();
+    
+    if(paramName!=NULL) {
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, paramName, 0);
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
+    }
+    readString( props, sizedStr, 0);
+    if(!isOK(props)) {
+        freeSizedString(&sizedStr);
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
+                "[ERROR] Can`t read string!!! Seems to be integritiy error", 1);
+        return;
+    }
+    *dest = appendString(NULL, sizedStr->bytes);
+    if(paramName!=NULL) {
+        if((*dest)==NULL) {
+            writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "NULL", 1);
+        } else {
+            writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, *dest, 1);
+        }
+    }
+    freeSizedString(&sizedStr);
+    return;
+}
+
+
+void readNumberWithDebug(LauncherProperties * props, DWORD * dest, char * paramName) {
+    writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
+    writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, paramName, 0);
+    writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
+    readNumber(props, dest);
+    
+    if(!isOK(props)) {
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
+                "[ERROR] Can`t read number !!! Seems to be integrity error", 1);
+        return;
+    }
+    writeDWORD(props, OUTPUT_LEVEL_DEBUG, 0, NULL, *dest, 1);
+    return;
+}
+void readBigNumberWithDebug(LauncherProperties * props, int64t * dest, char * paramName) {
+    DWORD low = 0;
+    DWORD high = 0;
+    writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Reading ", 0);
+    writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,  paramName, 0);
+    writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, " : ", 0);
+    
+    readNumber(props, &low);
+    if(isOK(props)) {
+        readNumber(props, &high);
+    }
+    if(!isOK(props)) {
+        writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0,
+                "[ERROR] Can`t read number !!! Seems to be integrity error", 1);
+        return;
+    }
+    dest->High = high;
+    dest->Low  = low;
+    writeint64t(props, OUTPUT_LEVEL_DEBUG, 0, "", dest, 1);
+}
+
+// returns: ERROR_OK, ERROR_INPUTOUPUT, ERROR_INTEGRITY
+void extractDataToFile(LauncherProperties * props, WCHAR *output, int64t * fileSize, DWORD expectedCRC ) {
+    if(isOK(props)) {
+        DWORD * status = & props->status;
+        HANDLE hFileRead = props->handler;
+        int64t * size = fileSize;
+        DWORD counter = 0;
+        DWORD crc32 = -1L;
+        HANDLE hFileWrite = CreateFileW(output, GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, hFileRead);
+        
+        if (hFileWrite == INVALID_HANDLE_VALUE) {
+            WCHAR * err;
+            writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "[ERROR] Can`t create file ", 0);
+            writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, output, 1);
+            
+            err = getErrorDescription(GetLastError());
+            writeMessageA(props, OUTPUT_LEVEL_DEBUG, 0, "Error description : ", 0);
+            writeMessageW(props, OUTPUT_LEVEL_DEBUG, 0, err, 1);
+            
... 6292 lines suppressed ...


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 07/19: [NETBEANS-1671] Donation 3 - Include installer sources (#1052)

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit f60b1b6ffab0d4617004b0d955e21eb23b6ad758
Author: Reema Taneja <32...@users.noreply.github.com>
AuthorDate: Thu May 2 14:42:32 2019 +0530

    [NETBEANS-1671] Donation 3 - Include installer sources (#1052)
    
    * [NETBEANS-1671] Include donated Installer source in Apache NetBeans
    
    * NB10-JDK11.0.1 bundle related changes
    
    * convert to Apache licence
    
    * convert to Apache licence
    
    * convert to Apache licence
    
    * convert to Apache licence
    
    * update ignored-binaries
    
    * Added support to create NetBeans installers
    
    * updated bg image in mac installer
    
    * moved installer from root to under nbbuild
    
    * moved installer to nbbuild
    
    * Update ignored-binaries
    
    * license updates and removed external binaries
    
    * updated ignore-binaries
    
    * added missing license text
    
    * adding git ignored files under infra/build
    
    * misc build related changes
    
    * fix build issues
    
    * fix build issues
    
    * fix file name typo
    
    * bin name change
    
    * mac installer build related changes
    
    * more fixes
    
    * minor fixes
    
    * mac installer signing support
    
    * Removed files not used in installer - set 1
    
    * removed unused installer code
    
    * Revert "removed unused installer code"
    
    This reverts commit 7b078833890f223271ee8b172a2ae669a6576b66.
    
    * Create binaries
    
    * Delete binaries
    
    * Fix JDK 12 install not showing in jdkhomes dropdown
    
    * removed code not currently being used in installers
    
    * removed files not used in installer
    
    * undo icon file change to avoid conflic with pr 1196
---
 launcher/windows/i18n/launcher.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/launcher/windows/i18n/launcher.properties b/launcher/windows/i18n/launcher.properties
index 39f2b00..70f24c5 100644
--- a/launcher/windows/i18n/launcher.properties
+++ b/launcher/windows/i18n/launcher.properties
@@ -48,7 +48,7 @@ nlw.msg.jvmsearch=Finding JVM on your system ...
 nlw.msg.setoptions=Setting command options ...
 nlw.msg.running=Running JVM ...
 nlw.msg.title=Please wait while the launcher prepares data to run the installer ...
-nlw.msg.messagebox.title=NetBeans IDE Installer
+nlw.msg.messagebox.title=Apache NetBeans IDE Installer
 nlw.msg.progress.title=Configuring the installer ...
 nlw.msg.button.error=Exit Installer
-nlw.msg.main.title=NetBeans IDE Installer
+nlw.msg.main.title=Apache NetBeans IDE Installer


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 14/19: Open clean up code base to remove Windows 95 & 98 support..

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 8188a1476db8db5ea58925aec9271967137459d4
Author: Brad Walker <bw...@musings.com>
AuthorDate: Sun Apr 24 18:49:57 2022 -0600

     Open clean up code base to remove Windows 95 & 98 support..
    
    Windows 95 & Windows 98 support is no longer provided by the base JVM. Matter of fact, support ended in Java 5 for these platforms.
    
    This cleans up the code base to no longer support these obsolete platforms.
---
 launcher/windows/src/ExtractUtils.c |  1 -
 launcher/windows/src/Main.c         | 31 +++++++++++++------------------
 launcher/windows/src/SystemUtils.c  |  5 -----
 launcher/windows/src/SystemUtils.h  |  1 -
 4 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/launcher/windows/src/ExtractUtils.c b/launcher/windows/src/ExtractUtils.c
index edbfa55..5eb8316 100644
--- a/launcher/windows/src/ExtractUtils.c
+++ b/launcher/windows/src/ExtractUtils.c
@@ -60,7 +60,6 @@ void skipStub(LauncherProperties * props) {
         WCHAR * os;
         props->status = EXIT_CODE_STUB;        
         os = appendStringW(NULL, L"It`s only the launcher stub.\nOS: ");
-        if(is9x()) os = appendStringW(os, L"Windows 9x");
         if(isNT()) os = appendStringW(os, L"Windows NT");
         if(is2k()) os = appendStringW(os, L"Windows 2000");
         if(isXP()) os = appendStringW(os, L"Windows XP");
diff --git a/launcher/windows/src/Main.c b/launcher/windows/src/Main.c
index 5a819ee..e7b7b75 100644
--- a/launcher/windows/src/Main.c
+++ b/launcher/windows/src/Main.c
@@ -634,27 +634,22 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hi, LPSTR lpCmdLine, int nCmd
     globalInstance = hInstance;
     UNREFERENCED_PARAMETER(lpCmdLine);
     initWow64();
-    if(is9x()) {
-        MessageBoxA(0, "Windows 9X platform is not supported", "Message", MB_OK);
-        status = EXIT_CODE_SYSTEM_ERROR;
+    if(!createEvents()) {
+        status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
     } else {
-        if(!createEvents()) {
-            status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
+        LauncherProperties * props = createLauncherProperties();
+        createLauncherThread(props);
+        if(!createGui(props, hInstance, hi, nCmdShow)) {
+            status = EXIT_CODE_GUI_INITIALIZATION_ERROR;
         } else {
-            LauncherProperties * props = createLauncherProperties();
-            createLauncherThread(props);
-            if(!createGui(props, hInstance, hi, nCmdShow)) {
-                status = EXIT_CODE_GUI_INITIALIZATION_ERROR;	        
-            } else {	        
-                messageLoop(props);
-                WaitForSingleObject(closingWindowsConfirmed, INFINITE);
-            }
-            
-            status = props->status;
-            exitCode = props->exitCode;
-            printStatus(props);
-            freeLauncherProperties(&props);
+            messageLoop(props);
+            WaitForSingleObject(closingWindowsConfirmed, INFINITE);
         }
+
+        status = props->status;
+        exitCode = props->exitCode;
+        printStatus(props);
+        freeLauncherProperties(&props);
     }
     FREE(currentProgressSize);
     FREE(totalProgressSize);
diff --git a/launcher/windows/src/SystemUtils.c b/launcher/windows/src/SystemUtils.c
index c8b423e..983ea13 100644
--- a/launcher/windows/src/SystemUtils.c
+++ b/launcher/windows/src/SystemUtils.c
@@ -36,11 +36,6 @@ void getOSVersion(DWORD *id, DWORD *major, DWORD *minor, DWORD *productType) {
     return;
 }
 
-DWORD is9x() {
-    DWORD id, major, minor, type;
-    getOSVersion(& id, & major, & minor, & type);
-    return (id == VER_PLATFORM_WIN32_WINDOWS) ? 1 : 0;
-}
 DWORD isNT() {    
     DWORD id, major, minor, type;
     getOSVersion(& id, & major, & minor, & type);
diff --git a/launcher/windows/src/SystemUtils.h b/launcher/windows/src/SystemUtils.h
index 69437f8..bdbffc5 100644
--- a/launcher/windows/src/SystemUtils.h
+++ b/launcher/windows/src/SystemUtils.h
@@ -24,7 +24,6 @@
 extern "C" {
 #endif
 
-DWORD is9x();
 DWORD isNT();
 DWORD isXP();
 DWORD is2k();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 12/19: [NETBEANS-2523] Installer creates invalid Win Registry value

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit d60ca4f0dfe440d1ce6f478d75f32a7ae612fe05
Author: Lars Bruun-Hansen <lb...@apache.org>
AuthorDate: Sat Jan 4 22:35:05 2020 +0100

    [NETBEANS-2523] Installer creates invalid Win Registry value
    
    The WindowsRegistry_set32BitValue0() function was incorrectly using
    the length of the Registry name (e.g. 'NoModify') as the the length of
    value. Since the value we are setting is of type DWORD the length is
    indeed always exactly 4 bytes, regardless of OS bitness.
    Solution: sizeof(dword) will always return 4, but we might as well
    have hard-coded the 4.
---
 jnilib/windows/src/jni_WindowsRegistry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jnilib/windows/src/jni_WindowsRegistry.c b/jnilib/windows/src/jni_WindowsRegistry.c
index 524a166..3608bf0 100644
--- a/jnilib/windows/src/jni_WindowsRegistry.c
+++ b/jnilib/windows/src/jni_WindowsRegistry.c
@@ -430,7 +430,7 @@ JNIEXPORT void JNICALL Java_org_netbeans_installer_utils_system_windows_WindowsR
     DWORD  dword     = (DWORD) jValue;
     LPBYTE byteValue = (LPBYTE) &dword;
     
-    if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_DWORD, byteValue, sizeof(name), 0)) {
+    if (!setValue(getMode(jMode),getHKEY(jSection), key, name, REG_DWORD, byteValue, sizeof(dword), 0)) {
         throwException(jEnv, "Cannot set value");
     }
     


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 13/19: Adding the fix that was applied to generate the Mac OS installer for Apache NetBeans 12.1

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit c19236bb084bbec21dad71c3c093e4687717e7ff
Author: John McDonnell <mc...@gmail.com>
AuthorDate: Mon Sep 7 21:16:15 2020 +0100

    Adding the fix that was applied to generate the Mac OS installer for Apache NetBeans 12.1
---
 launcher/unix/src/launcher.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/launcher/unix/src/launcher.sh b/launcher/unix/src/launcher.sh
index 31cca1d..5a6fc13 100644
--- a/launcher/unix/src/launcher.sh
+++ b/launcher/unix/src/launcher.sh
@@ -955,7 +955,7 @@ installBundledJVMs() {
 
 searchJavaOnMacOs() {
         if [ -x "/usr/libexec/java_home" ]; then
-            javaOnMacHome=`/usr/libexec/java_home --version 1.8+ --failfast`
+            javaOnMacHome=`/usr/libexec/java_home --failfast`
         fi
 
         if [ ! -x "$javaOnMacHome/bin/java" -a -f "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" ] ; then


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 04/19: [NETBEANS-309] Add licenseinfo.xml for image data clarifying license status

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 39a33e6f0a95a5212d57c46d8b6ae5c0cde82b73
Author: Matthias Bläsing <mb...@doppel-helix.eu>
AuthorDate: Wed Apr 4 21:59:50 2018 +0200

    [NETBEANS-309] Add licenseinfo.xml for image data clarifying license status
    
    Most of the icons used in netbeans today were part of the donation zip
    from oracle. As oracle removed several image files prior to donation, I
    have to assume that they exercised due diligence regarding images
    and considered these donateable.
    
    The icons not having been donated came from apache committers, so are
    considered save.
    
    This changeset documents that state in the licenseinfo.xml files per module.
    The informarion is summarized into rat-appendix.txt.
---
 launcher/windows/resources/nlw-alt.exe.manifest | 20 ++++++++++++++++++++
 launcher/windows/resources/nlw.exe.manifest     | 20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/launcher/windows/resources/nlw-alt.exe.manifest b/launcher/windows/resources/nlw-alt.exe.manifest
index 8821bdc..62fb856 100644
--- a/launcher/windows/resources/nlw-alt.exe.manifest
+++ b/launcher/windows/resources/nlw-alt.exe.manifest
@@ -1,4 +1,24 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
    <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="nlw" type="win32"/>
       <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
diff --git a/launcher/windows/resources/nlw.exe.manifest b/launcher/windows/resources/nlw.exe.manifest
index c3fabc1..a22dcb9 100644
--- a/launcher/windows/resources/nlw.exe.manifest
+++ b/launcher/windows/resources/nlw.exe.manifest
@@ -1,4 +1,24 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
    <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="nlw" type="win32"/>
       <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 11/19: [NETBEANS-3094] NBI cleaner process must attempt to delete read-only files too.

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 0b5c1520ba6cb64a1f53d82936fa64353dc8401b
Author: Lars Bruun-Hansen <lb...@apache.org>
AuthorDate: Sat Sep 14 22:39:31 2019 +0200

    [NETBEANS-3094] NBI cleaner process must attempt to delete read-only
    files too.
    
    - Attempt to remove read-only attrib on a file/folder before
    attempting to delete it.
    - Also added braces on existing statements to make the code more
    readable.
---
 cleaner/windows/src/main.c | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)

diff --git a/cleaner/windows/src/main.c b/cleaner/windows/src/main.c
index 74f0850..43271ff 100644
--- a/cleaner/windows/src/main.c
+++ b/cleaner/windows/src/main.c
@@ -257,6 +257,7 @@ void readStringList(HANDLE fileHandle, WCHAR *** list, DWORD *number) {
 }
 
 void deleteFile(WCHAR * filePath) {
+    BOOL canDelete = TRUE;
     DWORD count = 0 ;
     WIN32_FILE_ATTRIBUTE_DATA attrs;
     DWORD filePathLength = lstrlenW(filePath);
@@ -271,15 +272,30 @@ void deleteFile(WCHAR * filePath) {
         file[i+prefixLength] = filePath[i];
     }
 
+    // Implementation note:
+    // GetFileAttributesExW() is used not only to get file attributes
+    // but also as a way to check if the file/dir (still) exist.
+
     if(GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) {
-        if(attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-            while((!RemoveDirectoryW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
-                ((count++) < MAX_ATTEMPTS))
-                Sleep(SLEEP_DELAY);
-        else
-            while((!DeleteFileW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
-                ((count++) < MAX_ATTEMPTS))
-                Sleep(SLEEP_DELAY);
+      if (attrs.dwFileAttributes & FILE_ATTRIBUTE_READONLY) { // if read-only attrib is set
+            if (SetFileAttributesW(file, FILE_ATTRIBUTE_NORMAL) == 0) { // remove read-only attrib
+                // The read-only attrib could not be deleted. No point in continuing.
+                canDelete = FALSE;
+            }
+        }
+        if (canDelete) {
+            if (attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+                while ((!RemoveDirectoryW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
+                        ((count++) < MAX_ATTEMPTS)) {
+                    Sleep(SLEEP_DELAY);
+                }
+            } else {
+                while ((!DeleteFileW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
+                        ((count++) < MAX_ATTEMPTS)) {
+                    Sleep(SLEEP_DELAY);
+                }
+            }
+        }
     }
     LocalFree(file);
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 08/19: [NETBEANS-2381] JDK 12 ver string support in nbi native win launcher (#1196)

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit e89fd9fd275887844d6d0027d201f76cf6420785
Author: Reema Taneja <32...@users.noreply.github.com>
AuthorDate: Fri May 10 10:28:45 2019 +0530

    [NETBEANS-2381] JDK 12 ver string support in nbi native win launcher (#1196)
    
    * [NETBEANS-2381] JDK 12 version string support
    
    * renamed license file
    
    * renamed license file
---
 launcher/windows/resources/icon.ico | Bin 300318 -> 99678 bytes
 launcher/windows/src/JavaUtils.c    |   3 ++-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/launcher/windows/resources/icon.ico b/launcher/windows/resources/icon.ico
index e730c4a..ec123c0 100644
Binary files a/launcher/windows/resources/icon.ico and b/launcher/windows/resources/icon.ico differ
diff --git a/launcher/windows/src/JavaUtils.c b/launcher/windows/src/JavaUtils.c
index 6012afb..9e4245e 100644
--- a/launcher/windows/src/JavaUtils.c
+++ b/launcher/windows/src/JavaUtils.c
@@ -42,6 +42,7 @@ const DWORD JVM_EXTRACTION_TIMEOUT = 180000;  //180sec
 WCHAR * JAVA_REGISTRY_KEYS [] = {
     L"SOFTWARE\\JavaSoft\\Java Runtime Environment",
     L"SOFTWARE\\JavaSoft\\Java Development Kit",
+    L"SOFTWARE\\JavaSoft\\JDK",
     L"SOFTWARE\\JRockit\\Java Runtime Environment",
     L"SOFTWARE\\JRockit\\Java Development Kit",
     L"SOFTWARE\\IBM\\Java Runtime Environment",
@@ -138,7 +139,7 @@ JavaVersion * getJavaVersionFromString(char * string, DWORD * result) {
             major = (major) * 10 + c - '0';
             if (major > 999) return vers;
             continue;
-        } else if(c=='.'){
+        } else if(c=='.' || c=='+'){
             break;
         } else{
             return vers;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 02/19: [NETBEANS-54] First batch of license header changes to Apache

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit bca92aac611fa23fcf17392ad292c2de8db1ba65
Author: geertjan <ge...@oracle.com>
AuthorDate: Thu Sep 21 08:59:22 2017 -0400

    [NETBEANS-54] First batch of license header changes to Apache
---
 build.properties                                  | 48 ++++++---------------
 build.xml                                         | 48 +++++++--------------
 cleaner/unix/src/cleaner.sh                       | 48 ++++++---------------
 cleaner/windows/Makefile                          | 48 ++++++---------------
 cleaner/windows/nbproject/configurations.xml      | 48 +++++++--------------
 cleaner/windows/nbproject/project.properties      | 48 ++++++---------------
 cleaner/windows/nbproject/project.xml             | 48 +++++++--------------
 cleaner/windows/src/main.c                        | 50 +++++++---------------
 jnilib/.common/src/CommonUtils.c                  | 50 +++++++---------------
 jnilib/.common/src/CommonUtils.h                  | 50 +++++++---------------
 jnilib/.unix/src/jni_UnixNativeUtils.c            | 50 +++++++---------------
 jnilib/.unix/src/jni_UnixNativeUtils.h            | 50 +++++++---------------
 jnilib/linux/Makefile                             | 48 ++++++---------------
 jnilib/linux/nbproject/configurations.xml         | 48 +++++++--------------
 jnilib/linux/nbproject/project.properties         | 48 ++++++---------------
 jnilib/linux/nbproject/project.xml                | 48 +++++++--------------
 jnilib/macosx/Makefile                            | 48 ++++++---------------
 jnilib/macosx/nbproject/configurations.xml        | 47 ++++++--------------
 jnilib/macosx/nbproject/project.properties        | 48 ++++++---------------
 jnilib/macosx/nbproject/project.xml               | 48 +++++++--------------
 jnilib/solaris-sparc/Makefile                     | 48 ++++++---------------
 jnilib/solaris-sparc/nbproject/configurations.xml | 48 +++++++--------------
 jnilib/solaris-sparc/nbproject/project.properties | 48 ++++++---------------
 jnilib/solaris-sparc/nbproject/project.xml        | 48 +++++++--------------
 jnilib/solaris-x86/Makefile                       | 48 ++++++---------------
 jnilib/solaris-x86/nbproject/configurations.xml   | 48 +++++++--------------
 jnilib/solaris-x86/nbproject/project.properties   | 48 ++++++---------------
 jnilib/solaris-x86/nbproject/project.xml          | 48 +++++++--------------
 jnilib/windows/Makefile                           | 48 ++++++---------------
 jnilib/windows/nbproject/configurations.xml       | 48 +++++++--------------
 jnilib/windows/nbproject/project.properties       | 48 ++++++---------------
 jnilib/windows/nbproject/project.xml              | 48 +++++++--------------
 jnilib/windows/src/WindowsUtils.c                 | 50 +++++++---------------
 jnilib/windows/src/WindowsUtils.h                 | 50 +++++++---------------
 jnilib/windows/src/jni_WindowsNativeUtils.c       | 50 +++++++---------------
 jnilib/windows/src/jni_WindowsNativeUtils.h       | 50 +++++++---------------
 jnilib/windows/src/jni_WindowsRegistry.c          | 50 +++++++---------------
 jnilib/windows/src/jni_WindowsRegistry.h          | 50 +++++++---------------
 launcher/unix/i18n/launcher.properties            | 48 ++++++---------------
 launcher/unix/src/launcher.sh                     | 48 ++++++---------------
 launcher/windows/Makefile                         | 48 ++++++---------------
 launcher/windows/i18n/launcher.properties         | 48 ++++++---------------
 launcher/windows/nbproject/configurations.xml     | 47 ++++++--------------
 launcher/windows/nbproject/project.properties     | 48 ++++++---------------
 launcher/windows/nbproject/project.xml            | 48 +++++++--------------
 launcher/windows/resources/res.rc                 | 52 +++++++----------------
 launcher/windows/src/Errors.h                     | 50 +++++++---------------
 launcher/windows/src/ExtractUtils.c               | 50 +++++++---------------
 launcher/windows/src/ExtractUtils.h               | 50 +++++++---------------
 launcher/windows/src/FileUtils.c                  | 50 +++++++---------------
 launcher/windows/src/FileUtils.h                  | 50 +++++++---------------
 launcher/windows/src/JavaUtils.c                  | 50 +++++++---------------
 launcher/windows/src/JavaUtils.h                  | 50 +++++++---------------
 launcher/windows/src/Launcher.c                   | 50 +++++++---------------
 launcher/windows/src/Launcher.h                   | 50 +++++++---------------
 launcher/windows/src/Main.c                       | 50 +++++++---------------
 launcher/windows/src/Main.h                       | 50 +++++++---------------
 launcher/windows/src/ProcessUtils.c               | 50 +++++++---------------
 launcher/windows/src/ProcessUtils.h               | 50 +++++++---------------
 launcher/windows/src/RegistryUtils.c              | 50 +++++++---------------
 launcher/windows/src/RegistryUtils.h              | 50 +++++++---------------
 launcher/windows/src/StringUtils.c                | 50 +++++++---------------
 launcher/windows/src/StringUtils.h                | 50 +++++++---------------
 launcher/windows/src/SystemUtils.c                | 50 +++++++---------------
 launcher/windows/src/SystemUtils.h                | 50 +++++++---------------
 launcher/windows/src/Types.h                      | 50 +++++++---------------
 66 files changed, 969 insertions(+), 2263 deletions(-)

diff --git a/build.properties b/build.properties
index 4359a3b..5959d93 100644
--- a/build.properties
+++ b/build.properties
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 #ignore.native=
diff --git a/build.xml b/build.xml
index 2378874..58c97a6 100644
--- a/build.xml
+++ b/build.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <project name="native" default="default" basedir=".">
diff --git a/cleaner/unix/src/cleaner.sh b/cleaner/unix/src/cleaner.sh
index 4d91691..cfae216 100644
--- a/cleaner/unix/src/cleaner.sh
+++ b/cleaner/unix/src/cleaner.sh
@@ -1,41 +1,21 @@
 #!/bin/sh
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 deleteFiles() {
diff --git a/cleaner/windows/Makefile b/cleaner/windows/Makefile
index bf5b7f9..98cf53c 100644
--- a/cleaner/windows/Makefile
+++ b/cleaner/windows/Makefile
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 # Environment 
diff --git a/cleaner/windows/nbproject/configurations.xml b/cleaner/windows/nbproject/configurations.xml
index 83d7e4b..b16b628 100644
--- a/cleaner/windows/nbproject/configurations.xml
+++ b/cleaner/windows/nbproject/configurations.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <configurationDescriptor version="35">
diff --git a/cleaner/windows/nbproject/project.properties b/cleaner/windows/nbproject/project.properties
index 75bafc2..3807b67 100644
--- a/cleaner/windows/nbproject/project.properties
+++ b/cleaner/windows/nbproject/project.properties
@@ -1,40 +1,20 @@
 
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
diff --git a/cleaner/windows/nbproject/project.xml b/cleaner/windows/nbproject/project.xml
index d8bb645..ded3e3c 100644
--- a/cleaner/windows/nbproject/project.xml
+++ b/cleaner/windows/nbproject/project.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <project xmlns="http://www.netbeans.org/ns/project/1">
diff --git a/cleaner/windows/src/main.c b/cleaner/windows/src/main.c
index 21d2d9d..2743377 100644
--- a/cleaner/windows/src/main.c
+++ b/cleaner/windows/src/main.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <windows.h>
diff --git a/jnilib/.common/src/CommonUtils.c b/jnilib/.common/src/CommonUtils.c
index 9699f2a..3984628 100644
--- a/jnilib/.common/src/CommonUtils.c
+++ b/jnilib/.common/src/CommonUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/.common/src/CommonUtils.h b/jnilib/.common/src/CommonUtils.h
index 5047daf..b11aacd 100644
--- a/jnilib/.common/src/CommonUtils.h
+++ b/jnilib/.common/src/CommonUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.c b/jnilib/.unix/src/jni_UnixNativeUtils.c
index 8b4489c..24da65d 100644
--- a/jnilib/.unix/src/jni_UnixNativeUtils.c
+++ b/jnilib/.unix/src/jni_UnixNativeUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.h b/jnilib/.unix/src/jni_UnixNativeUtils.h
index 8f8c92c..654e750 100644
--- a/jnilib/.unix/src/jni_UnixNativeUtils.h
+++ b/jnilib/.unix/src/jni_UnixNativeUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/linux/Makefile b/jnilib/linux/Makefile
index 64e76e1..516847d 100644
--- a/jnilib/linux/Makefile
+++ b/jnilib/linux/Makefile
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 #
diff --git a/jnilib/linux/nbproject/configurations.xml b/jnilib/linux/nbproject/configurations.xml
index 018e1ec..9e8e8b1 100644
--- a/jnilib/linux/nbproject/configurations.xml
+++ b/jnilib/linux/nbproject/configurations.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <configurationDescriptor version="35">
diff --git a/jnilib/linux/nbproject/project.properties b/jnilib/linux/nbproject/project.properties
index 75bafc2..3807b67 100644
--- a/jnilib/linux/nbproject/project.properties
+++ b/jnilib/linux/nbproject/project.properties
@@ -1,40 +1,20 @@
 
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
diff --git a/jnilib/linux/nbproject/project.xml b/jnilib/linux/nbproject/project.xml
index f47994a..4e61d3b 100644
--- a/jnilib/linux/nbproject/project.xml
+++ b/jnilib/linux/nbproject/project.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <project xmlns="http://www.netbeans.org/ns/project/1">
diff --git a/jnilib/macosx/Makefile b/jnilib/macosx/Makefile
index 64e76e1..516847d 100644
--- a/jnilib/macosx/Makefile
+++ b/jnilib/macosx/Makefile
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 #
diff --git a/jnilib/macosx/nbproject/configurations.xml b/jnilib/macosx/nbproject/configurations.xml
index d08e612..50ab41e 100644
--- a/jnilib/macosx/nbproject/configurations.xml
+++ b/jnilib/macosx/nbproject/configurations.xml
@@ -1,42 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright (c) 2007, 2016 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
 
-The contents of this file are subject to the terms of either the GNU
-General Public License Version 2 only ("GPL") or the Common
-Development and Distribution License("CDDL") (collectively, the
-"License"). You may not use this file except in compliance with the
-License. You can obtain a copy of the License at
-http://www.netbeans.org/cddl-gplv2.html
-or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
-specific language governing permissions and limitations under the
-License.  When distributing the software, include this License Header
-Notice in each file and include the License file at
-nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the GPL Version 2 section of the License file that
-accompanied this code. If applicable, add the following below the
-License Header, with the fields enclosed by brackets [] replaced by
-your own identifying information:
-"Portions Copyrighted [year] [name of copyright owner]"
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-If you wish your version of this file to be governed by only the CDDL
-or only the GPL Version 2, indicate your decision by adding
-"[Contributor] elects to include this software in this distribution
-under the [CDDL or GPL Version 2] license." If you do not indicate a
-single choice of license, a recipient has the option to distribute
-your version of this file under either the CDDL, the GPL Version 2 or
-to extend the choice of license to its licensees as provided above.
-However, if you add GPL Version 2 code and therefore, elected the GPL
-Version 2 license, then the option applies only if the new code is
-made subject to such option by the copyright holder.
-
-Contributor(s):
 -->
 <configurationDescriptor version="45">
   <logicalFolder name="root" displayName="root" projectFiles="true">
diff --git a/jnilib/macosx/nbproject/project.properties b/jnilib/macosx/nbproject/project.properties
index 75bafc2..3807b67 100644
--- a/jnilib/macosx/nbproject/project.properties
+++ b/jnilib/macosx/nbproject/project.properties
@@ -1,40 +1,20 @@
 
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
diff --git a/jnilib/macosx/nbproject/project.xml b/jnilib/macosx/nbproject/project.xml
index 08fb3de..1825876 100644
--- a/jnilib/macosx/nbproject/project.xml
+++ b/jnilib/macosx/nbproject/project.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 <project xmlns="http://www.netbeans.org/ns/project/1">
     <type>org.netbeans.modules.cnd.makeproject</type>
diff --git a/jnilib/solaris-sparc/Makefile b/jnilib/solaris-sparc/Makefile
index 64e76e1..516847d 100644
--- a/jnilib/solaris-sparc/Makefile
+++ b/jnilib/solaris-sparc/Makefile
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 #
diff --git a/jnilib/solaris-sparc/nbproject/configurations.xml b/jnilib/solaris-sparc/nbproject/configurations.xml
index f37cec3..98c3b5c 100644
--- a/jnilib/solaris-sparc/nbproject/configurations.xml
+++ b/jnilib/solaris-sparc/nbproject/configurations.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <configurationDescriptor version="35">
diff --git a/jnilib/solaris-sparc/nbproject/project.properties b/jnilib/solaris-sparc/nbproject/project.properties
index 75bafc2..3807b67 100644
--- a/jnilib/solaris-sparc/nbproject/project.properties
+++ b/jnilib/solaris-sparc/nbproject/project.properties
@@ -1,40 +1,20 @@
 
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
diff --git a/jnilib/solaris-sparc/nbproject/project.xml b/jnilib/solaris-sparc/nbproject/project.xml
index be61aca..c6febe0 100644
--- a/jnilib/solaris-sparc/nbproject/project.xml
+++ b/jnilib/solaris-sparc/nbproject/project.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <project xmlns="http://www.netbeans.org/ns/project/1">
diff --git a/jnilib/solaris-x86/Makefile b/jnilib/solaris-x86/Makefile
index 64e76e1..516847d 100644
--- a/jnilib/solaris-x86/Makefile
+++ b/jnilib/solaris-x86/Makefile
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 #
diff --git a/jnilib/solaris-x86/nbproject/configurations.xml b/jnilib/solaris-x86/nbproject/configurations.xml
index ec55f70..18c1468 100644
--- a/jnilib/solaris-x86/nbproject/configurations.xml
+++ b/jnilib/solaris-x86/nbproject/configurations.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <configurationDescriptor version="35">
diff --git a/jnilib/solaris-x86/nbproject/project.properties b/jnilib/solaris-x86/nbproject/project.properties
index 75bafc2..3807b67 100644
--- a/jnilib/solaris-x86/nbproject/project.properties
+++ b/jnilib/solaris-x86/nbproject/project.properties
@@ -1,40 +1,20 @@
 
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
diff --git a/jnilib/solaris-x86/nbproject/project.xml b/jnilib/solaris-x86/nbproject/project.xml
index 3fd2701..fdb4477 100644
--- a/jnilib/solaris-x86/nbproject/project.xml
+++ b/jnilib/solaris-x86/nbproject/project.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <project xmlns="http://www.netbeans.org/ns/project/1">
diff --git a/jnilib/windows/Makefile b/jnilib/windows/Makefile
index 64e76e1..516847d 100644
--- a/jnilib/windows/Makefile
+++ b/jnilib/windows/Makefile
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 #
diff --git a/jnilib/windows/nbproject/configurations.xml b/jnilib/windows/nbproject/configurations.xml
index 8cb7437..b7731b5 100644
--- a/jnilib/windows/nbproject/configurations.xml
+++ b/jnilib/windows/nbproject/configurations.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <configurationDescriptor version="35">
diff --git a/jnilib/windows/nbproject/project.properties b/jnilib/windows/nbproject/project.properties
index 75bafc2..3807b67 100644
--- a/jnilib/windows/nbproject/project.properties
+++ b/jnilib/windows/nbproject/project.properties
@@ -1,40 +1,20 @@
 
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
diff --git a/jnilib/windows/nbproject/project.xml b/jnilib/windows/nbproject/project.xml
index a3307ff..1aa64eb 100644
--- a/jnilib/windows/nbproject/project.xml
+++ b/jnilib/windows/nbproject/project.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 
 <project xmlns="http://www.netbeans.org/ns/project/1">
diff --git a/jnilib/windows/src/WindowsUtils.c b/jnilib/windows/src/WindowsUtils.c
index b658710..ed5d835 100644
--- a/jnilib/windows/src/WindowsUtils.c
+++ b/jnilib/windows/src/WindowsUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/windows/src/WindowsUtils.h b/jnilib/windows/src/WindowsUtils.h
index 4a8868c..eaa2aeb 100644
--- a/jnilib/windows/src/WindowsUtils.h
+++ b/jnilib/windows/src/WindowsUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.c b/jnilib/windows/src/jni_WindowsNativeUtils.c
index 762d45c..b21da67 100644
--- a/jnilib/windows/src/jni_WindowsNativeUtils.c
+++ b/jnilib/windows/src/jni_WindowsNativeUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.h b/jnilib/windows/src/jni_WindowsNativeUtils.h
index 47372b4..d673d94 100644
--- a/jnilib/windows/src/jni_WindowsNativeUtils.h
+++ b/jnilib/windows/src/jni_WindowsNativeUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/windows/src/jni_WindowsRegistry.c b/jnilib/windows/src/jni_WindowsRegistry.c
index b586a2f..a157477 100644
--- a/jnilib/windows/src/jni_WindowsRegistry.c
+++ b/jnilib/windows/src/jni_WindowsRegistry.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/jnilib/windows/src/jni_WindowsRegistry.h b/jnilib/windows/src/jni_WindowsRegistry.h
index b80248b..05a144a 100644
--- a/jnilib/windows/src/jni_WindowsRegistry.h
+++ b/jnilib/windows/src/jni_WindowsRegistry.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <jni.h>
diff --git a/launcher/unix/i18n/launcher.properties b/launcher/unix/i18n/launcher.properties
index 3fbc316..73e6c6e 100644
--- a/launcher/unix/i18n/launcher.properties
+++ b/launcher/unix/i18n/launcher.properties
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 nlu.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 8 is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again.\nYou can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads
diff --git a/launcher/unix/src/launcher.sh b/launcher/unix/src/launcher.sh
index 0db024b..31cca1d 100644
--- a/launcher/unix/src/launcher.sh
+++ b/launcher/unix/src/launcher.sh
@@ -1,41 +1,21 @@
 #!/bin/sh
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2013 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 ARG_JAVAHOME="--javahome"
diff --git a/launcher/windows/Makefile b/launcher/windows/Makefile
index 2327cb7..1debec6 100644
--- a/launcher/windows/Makefile
+++ b/launcher/windows/Makefile
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 #
diff --git a/launcher/windows/i18n/launcher.properties b/launcher/windows/i18n/launcher.properties
index c9de214..39f2b00 100644
--- a/launcher/windows/i18n/launcher.properties
+++ b/launcher/windows/i18n/launcher.properties
@@ -1,40 +1,20 @@
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
 nlw.jvm.notfoundmessage=Java SE Development Kit (JDK) was not found on this computer\nJDK 8 or newer is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again. You can specify valid JDK location using {0} installer argument.\n\nTo download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads
diff --git a/launcher/windows/nbproject/configurations.xml b/launcher/windows/nbproject/configurations.xml
index a969ca9..095caed 100644
--- a/launcher/windows/nbproject/configurations.xml
+++ b/launcher/windows/nbproject/configurations.xml
@@ -1,42 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright (c) 2007, 2016 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
 
-The contents of this file are subject to the terms of either the GNU
-General Public License Version 2 only ("GPL") or the Common
-Development and Distribution License("CDDL") (collectively, the
-"License"). You may not use this file except in compliance with the
-License. You can obtain a copy of the License at
-http://www.netbeans.org/cddl-gplv2.html
-or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
-specific language governing permissions and limitations under the
-License.  When distributing the software, include this License Header
-Notice in each file and include the License file at
-nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the GPL Version 2 section of the License file that
-accompanied this code. If applicable, add the following below the
-License Header, with the fields enclosed by brackets [] replaced by
-your own identifying information:
-"Portions Copyrighted [year] [name of copyright owner]"
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-If you wish your version of this file to be governed by only the CDDL
-or only the GPL Version 2, indicate your decision by adding
-"[Contributor] elects to include this software in this distribution
-under the [CDDL or GPL Version 2] license." If you do not indicate a
-single choice of license, a recipient has the option to distribute
-your version of this file under either the CDDL, the GPL Version 2 or
-to extend the choice of license to its licensees as provided above.
-However, if you add GPL Version 2 code and therefore, elected the GPL
-Version 2 license, then the option applies only if the new code is
-made subject to such option by the copyright holder.
-
-Contributor(s):
 -->
 <configurationDescriptor version="84">
   <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
diff --git a/launcher/windows/nbproject/project.properties b/launcher/windows/nbproject/project.properties
index 75bafc2..3807b67 100644
--- a/launcher/windows/nbproject/project.properties
+++ b/launcher/windows/nbproject/project.properties
@@ -1,40 +1,20 @@
 
 #
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-# Other names may be trademarks of their respective owners.
-#
-# The contents of this file are subject to the terms of either the GNU General Public
-# License Version 2 only ("GPL") or the Common Development and Distribution
-# License("CDDL") (collectively, the "License"). You may not use this file except in
-# compliance with the License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-# License for the specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header Notice in
-# each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-# designates this particular file as subject to the "Classpath" exception as provided
-# by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-# If applicable, add the following below the License Header, with the fields enclosed
-# by brackets [] replaced by your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-# 
-# Contributor(s):
-# 
-# The Original Software is NetBeans. The Initial Developer of the Original Software
-# is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-# Rights Reserved.
-# 
-# If you wish your version of this file to be governed by only the CDDL or only the
-# GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-# this software in this distribution under the [CDDL or GPL Version 2] license." If
-# you do not indicate a single choice of license, a recipient has the option to
-# distribute your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above. However, if you
-# add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-# option applies only if the new code is made subject to such option by the copyright
-# holder.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 # 
 
diff --git a/launcher/windows/nbproject/project.xml b/launcher/windows/nbproject/project.xml
index d3ace8f..017b77b 100644
--- a/launcher/windows/nbproject/project.xml
+++ b/launcher/windows/nbproject/project.xml
@@ -1,41 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-  Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
 
-  Oracle and Java are registered trademarks of Oracle and/or its affiliates.
-  Other names may be trademarks of their respective owners.
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
 
-  The contents of this file are subject to the terms of either the GNU General Public
-  License Version 2 only ("GPL") or the Common Development and Distribution
-  License("CDDL") (collectively, the "License"). You may not use this file except in
-  compliance with the License. You can obtain a copy of the License at
-  http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
-  License for the specific language governing permissions and limitations under the
-  License.  When distributing the software, include this License Header Notice in
-  each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
-  designates this particular file as subject to the "Classpath" exception as provided
-  by Oracle in the GPL Version 2 section of the License file that accompanied this code.
-  If applicable, add the following below the License Header, with the fields enclosed
-  by brackets [] replaced by your own identifying information:
-  "Portions Copyrighted [year] [name of copyright owner]"
-  
-  Contributor(s):
-  
-  The Original Software is NetBeans. The Initial Developer of the Original Software
-  is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
-  Rights Reserved.
-  
-  If you wish your version of this file to be governed by only the CDDL or only the
-  GPL Version 2, indicate your decision by adding "[Contributor] elects to include
-  this software in this distribution under the [CDDL or GPL Version 2] license." If
-  you do not indicate a single choice of license, a recipient has the option to
-  distribute your version of this file under either the CDDL, the GPL Version 2 or
-  to extend the choice of license to its licensees as provided above. However, if you
-  add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the
-  option applies only if the new code is made subject to such option by the copyright
-  holder.
 -->
 <project xmlns="http://www.netbeans.org/ns/project/1">
     <type>org.netbeans.modules.cnd.makeproject</type>
diff --git a/launcher/windows/resources/res.rc b/launcher/windows/resources/res.rc
index 02860db..b501640 100644
--- a/launcher/windows/resources/res.rc
+++ b/launcher/windows/resources/res.rc
@@ -1,42 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 2007 Oracle and/or its affiliates. All rights reserved.
- *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 
diff --git a/launcher/windows/src/Errors.h b/launcher/windows/src/Errors.h
index ae89fa1..50a2409 100644
--- a/launcher/windows/src/Errors.h
+++ b/launcher/windows/src/Errors.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _Errors_H
diff --git a/launcher/windows/src/ExtractUtils.c b/launcher/windows/src/ExtractUtils.c
index 2ca6e5a..d96f40c 100644
--- a/launcher/windows/src/ExtractUtils.c
+++ b/launcher/windows/src/ExtractUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- *
- * Contributor(s):
- *
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- *
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <windows.h>
diff --git a/launcher/windows/src/ExtractUtils.h b/launcher/windows/src/ExtractUtils.h
index 0237b75..98655b0 100644
--- a/launcher/windows/src/ExtractUtils.h
+++ b/launcher/windows/src/ExtractUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _ExtractUtils_H
diff --git a/launcher/windows/src/FileUtils.c b/launcher/windows/src/FileUtils.c
index b527182..5ab272a 100644
--- a/launcher/windows/src/FileUtils.c
+++ b/launcher/windows/src/FileUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <windows.h>
diff --git a/launcher/windows/src/FileUtils.h b/launcher/windows/src/FileUtils.h
index 4081c34..60db47b 100644
--- a/launcher/windows/src/FileUtils.h
+++ b/launcher/windows/src/FileUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _FileUtils_H
diff --git a/launcher/windows/src/JavaUtils.c b/launcher/windows/src/JavaUtils.c
index 75aec52..0f1a1dd 100644
--- a/launcher/windows/src/JavaUtils.c
+++ b/launcher/windows/src/JavaUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- *
- * Contributor(s):
- *
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- *
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <wchar.h>
diff --git a/launcher/windows/src/JavaUtils.h b/launcher/windows/src/JavaUtils.h
index c541146..4508085 100644
--- a/launcher/windows/src/JavaUtils.h
+++ b/launcher/windows/src/JavaUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _JavaUtils_H
diff --git a/launcher/windows/src/Launcher.c b/launcher/windows/src/Launcher.c
index 3178f97..4c756f7 100644
--- a/launcher/windows/src/Launcher.c
+++ b/launcher/windows/src/Launcher.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- *
- * Contributor(s):
- *
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- *
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <windows.h>
diff --git a/launcher/windows/src/Launcher.h b/launcher/windows/src/Launcher.h
index 12b9ec7..b3d827f 100644
--- a/launcher/windows/src/Launcher.h
+++ b/launcher/windows/src/Launcher.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _Launcher_H
diff --git a/launcher/windows/src/Main.c b/launcher/windows/src/Main.c
index a9519bc..dbb3c5d 100644
--- a/launcher/windows/src/Main.c
+++ b/launcher/windows/src/Main.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
- *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- *
- * Contributor(s):
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <windows.h>
diff --git a/launcher/windows/src/Main.h b/launcher/windows/src/Main.h
index 445227e..bfe0ee1 100644
--- a/launcher/windows/src/Main.h
+++ b/launcher/windows/src/Main.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _Main_H
diff --git a/launcher/windows/src/ProcessUtils.c b/launcher/windows/src/ProcessUtils.c
index 458ce00..9abab4c 100644
--- a/launcher/windows/src/ProcessUtils.c
+++ b/launcher/windows/src/ProcessUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include "ProcessUtils.h"
diff --git a/launcher/windows/src/ProcessUtils.h b/launcher/windows/src/ProcessUtils.h
index df4c9f1..cc5859b 100644
--- a/launcher/windows/src/ProcessUtils.h
+++ b/launcher/windows/src/ProcessUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _ProcessUtils_H
diff --git a/launcher/windows/src/RegistryUtils.c b/launcher/windows/src/RegistryUtils.c
index 8c3534b..e7d537d 100644
--- a/launcher/windows/src/RegistryUtils.c
+++ b/launcher/windows/src/RegistryUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include "RegistryUtils.h"
diff --git a/launcher/windows/src/RegistryUtils.h b/launcher/windows/src/RegistryUtils.h
index d6b40ae..4ca8db4 100644
--- a/launcher/windows/src/RegistryUtils.h
+++ b/launcher/windows/src/RegistryUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _RegistryUtils_H
diff --git a/launcher/windows/src/StringUtils.c b/launcher/windows/src/StringUtils.c
index 1360ef4..306d9bd 100644
--- a/launcher/windows/src/StringUtils.c
+++ b/launcher/windows/src/StringUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <wchar.h>
diff --git a/launcher/windows/src/StringUtils.h b/launcher/windows/src/StringUtils.h
index b822e9c..ecf0938 100644
--- a/launcher/windows/src/StringUtils.h
+++ b/launcher/windows/src/StringUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _StringUtils_H
diff --git a/launcher/windows/src/SystemUtils.c b/launcher/windows/src/SystemUtils.c
index 1e67ee0..41f0dbf 100644
--- a/launcher/windows/src/SystemUtils.c
+++ b/launcher/windows/src/SystemUtils.c
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #include <windows.h>
diff --git a/launcher/windows/src/SystemUtils.h b/launcher/windows/src/SystemUtils.h
index 55f7df2..f375398 100644
--- a/launcher/windows/src/SystemUtils.h
+++ b/launcher/windows/src/SystemUtils.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _SystemUtils_H
diff --git a/launcher/windows/src/Types.h b/launcher/windows/src/Types.h
index 5b3b7b8..379bff6 100644
--- a/launcher/windows/src/Types.h
+++ b/launcher/windows/src/Types.h
@@ -1,40 +1,20 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright 1997-2012 Oracle and/or its affiliates. All rights reserved.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
- * Other names may be trademarks of their respective owners.
- *
- * The contents of this file are subject to the terms of either the GNU General
- * Public License Version 2 only ("GPL") or the Common Development and Distribution
- * License("CDDL") (collectively, the "License"). You may not use this file except in
- * compliance with the License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html or nbbuild/licenses/CDDL-GPL-2-CP. See the
- * License for the specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header Notice in
- * each file and include the License file at nbbuild/licenses/CDDL-GPL-2-CP.  Oracle
- * designates this particular file as subject to the "Classpath" exception as
- * provided by Oracle in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License Header,
- * with the fields enclosed by brackets [] replaced by your own identifying
- * information: "Portions Copyrighted [year] [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * The Original Software is NetBeans. The Initial Developer of the Original Software
- * is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun Microsystems, Inc. All
- * Rights Reserved.
- * 
- * If you wish your version of this file to be governed by only the CDDL or only the
- * GPL Version 2, indicate your decision by adding "[Contributor] elects to include
- * this software in this distribution under the [CDDL or GPL Version 2] license." If
- * you do not indicate a single choice of license, a recipient has the option to
- * distribute your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above. However, if
- * you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then
- * the option applies only if the new code is made subject to such option by the
- * copyright holder.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 #ifndef _Types_H


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 17/19: initial commit

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit a204ab9272dc70a2068a52e977be6772dd2e8803
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Wed Nov 16 15:52:22 2022 +0100

    initial commit
---
 build.properties => src/main/cpp/build.properties           |   0
 build.xml => src/main/cpp/build.xml                         |   0
 {cleaner => src/main/cpp/cleaner}/unix/src/cleaner.sh       |   0
 {cleaner => src/main/cpp/cleaner}/windows/Makefile          |   0
 {cleaner => src/main/cpp/cleaner}/windows/Makefile-vc       |   0
 .../main/cpp/cleaner}/windows/nbproject/configurations.xml  |   0
 .../main/cpp/cleaner}/windows/nbproject/project.properties  |   0
 .../main/cpp/cleaner}/windows/nbproject/project.xml         |   0
 {cleaner => src/main/cpp/cleaner}/windows/src/main.c        |   0
 .../cpp/cleaner}/windows/vcproject/NBI Native Cleaner.ncb   |   0
 .../cpp/cleaner}/windows/vcproject/NBI Native Cleaner.sln   |   0
 .../cpp/cleaner}/windows/vcproject/NBI Native Cleaner.suo   | Bin
 .../cleaner}/windows/vcproject/NBI Native Cleaner.vcproj    |   0
 .../windows/vcproject/NBI Native Cleaner.vcproj.user        |   0
 {jnilib => src/main/cpp/jnilib}/.common/src/CommonUtils.c   |   0
 {jnilib => src/main/cpp/jnilib}/.common/src/CommonUtils.h   |   0
 .../main/cpp/jnilib}/.unix/src/jni_UnixNativeUtils.c        |   0
 .../main/cpp/jnilib}/.unix/src/jni_UnixNativeUtils.h        |   0
 {jnilib => src/main/cpp/jnilib}/linux/Makefile              |   0
 .../main/cpp/jnilib}/linux/nbproject/configurations.xml     |   0
 .../main/cpp/jnilib}/linux/nbproject/project.properties     |   0
 {jnilib => src/main/cpp/jnilib}/linux/nbproject/project.xml |   0
 {jnilib => src/main/cpp/jnilib}/macosx/Makefile             |   0
 .../main/cpp/jnilib}/macosx/nbproject/configurations.xml    |   0
 .../main/cpp/jnilib}/macosx/nbproject/project.properties    |   0
 .../main/cpp/jnilib}/macosx/nbproject/project.xml           |   0
 {jnilib => src/main/cpp/jnilib}/solaris-sparc/Makefile      |   0
 .../cpp/jnilib}/solaris-sparc/nbproject/configurations.xml  |   0
 .../cpp/jnilib}/solaris-sparc/nbproject/project.properties  |   0
 .../main/cpp/jnilib}/solaris-sparc/nbproject/project.xml    |   0
 {jnilib => src/main/cpp/jnilib}/solaris-x86/Makefile        |   0
 .../cpp/jnilib}/solaris-x86/nbproject/configurations.xml    |   0
 .../cpp/jnilib}/solaris-x86/nbproject/project.properties    |   0
 .../main/cpp/jnilib}/solaris-x86/nbproject/project.xml      |   0
 {jnilib => src/main/cpp/jnilib}/windows/Makefile            |   0
 {jnilib => src/main/cpp/jnilib}/windows/Makefile-vc         |   0
 {jnilib => src/main/cpp/jnilib}/windows/Makefile-vc-wo-crt  |   0
 .../main/cpp/jnilib}/windows/nbproject/configurations.xml   |   0
 .../main/cpp/jnilib}/windows/nbproject/project.properties   |   0
 .../main/cpp/jnilib}/windows/nbproject/project.xml          |   0
 {jnilib => src/main/cpp/jnilib}/windows/src/WindowsUtils.c  |   0
 {jnilib => src/main/cpp/jnilib}/windows/src/WindowsUtils.h  |   0
 .../main/cpp/jnilib}/windows/src/jni_WindowsNativeUtils.c   |   0
 .../main/cpp/jnilib}/windows/src/jni_WindowsNativeUtils.h   |   0
 .../main/cpp/jnilib}/windows/src/jni_WindowsRegistry.c      |   0
 .../main/cpp/jnilib}/windows/src/jni_WindowsRegistry.h      |   0
 .../main/cpp/jnilib}/windows/vcproject/NBI JNI Library.ncb  |   0
 .../main/cpp/jnilib}/windows/vcproject/NBI JNI Library.sln  |   0
 .../main/cpp/jnilib}/windows/vcproject/NBI JNI Library.suo  | Bin
 .../cpp/jnilib}/windows/vcproject/NBI JNI Library.vcproj    |   0
 .../jnilib}/windows/vcproject/NBI JNI Library.vcproj.user   |   0
 {jnilib => src/main/cpp/jnilib}/windows/vcproject/vc80.idb  | Bin
 .../main/cpp/launcher}/unix/i18n/launcher.properties        |   0
 {launcher => src/main/cpp/launcher}/unix/src/launcher.sh    |   0
 {launcher => src/main/cpp/launcher}/windows/.dep.inc        |   0
 {launcher => src/main/cpp/launcher}/windows/Makefile        |   0
 {launcher => src/main/cpp/launcher}/windows/Makefile-vc     |   0
 .../main/cpp/launcher}/windows/Makefile-vc-wo-crt           |   0
 .../main/cpp/launcher}/windows/i18n/launcher.properties     |   0
 .../main/cpp/launcher}/windows/nbproject/configurations.xml |   0
 .../main/cpp/launcher}/windows/nbproject/project.properties |   0
 .../main/cpp/launcher}/windows/nbproject/project.xml        |   0
 .../main/cpp/launcher}/windows/resources/icon.ico           | Bin
 .../cpp/launcher}/windows/resources/nlw-alt.exe.manifest    |   0
 .../main/cpp/launcher}/windows/resources/nlw.exe.manifest   |   0
 .../main/cpp/launcher}/windows/resources/res.rc             |   0
 {launcher => src/main/cpp/launcher}/windows/src/Errors.h    |   0
 .../main/cpp/launcher}/windows/src/ExtractUtils.c           |   0
 .../main/cpp/launcher}/windows/src/ExtractUtils.h           |   0
 {launcher => src/main/cpp/launcher}/windows/src/FileUtils.c |   0
 {launcher => src/main/cpp/launcher}/windows/src/FileUtils.h |   0
 {launcher => src/main/cpp/launcher}/windows/src/JavaUtils.c |   0
 {launcher => src/main/cpp/launcher}/windows/src/JavaUtils.h |   0
 {launcher => src/main/cpp/launcher}/windows/src/Launcher.c  |   0
 {launcher => src/main/cpp/launcher}/windows/src/Launcher.h  |   0
 {launcher => src/main/cpp/launcher}/windows/src/Main.c      |   0
 {launcher => src/main/cpp/launcher}/windows/src/Main.h      |   0
 .../main/cpp/launcher}/windows/src/ProcessUtils.c           |   0
 .../main/cpp/launcher}/windows/src/ProcessUtils.h           |   0
 .../main/cpp/launcher}/windows/src/RegistryUtils.c          |   0
 .../main/cpp/launcher}/windows/src/RegistryUtils.h          |   0
 .../main/cpp/launcher}/windows/src/StringUtils.c            |   0
 .../main/cpp/launcher}/windows/src/StringUtils.h            |   0
 .../main/cpp/launcher}/windows/src/SystemUtils.c            |   0
 .../main/cpp/launcher}/windows/src/SystemUtils.h            |   0
 {launcher => src/main/cpp/launcher}/windows/src/Types.h     |   0
 .../cpp/launcher}/windows/vcproject/NBI Native Launcher.ncb |   0
 .../cpp/launcher}/windows/vcproject/NBI Native Launcher.sln |   0
 .../cpp/launcher}/windows/vcproject/NBI Native Launcher.suo | Bin
 .../launcher}/windows/vcproject/NBI Native Launcher.vcproj  |   0
 .../NBI Native Launcher.vcproj.SARD.dlm198383.user          |   0
 .../windows/vcproject/NBI Native Launcher.vcproj.user       |   0
 92 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/build.properties b/src/main/cpp/build.properties
similarity index 100%
rename from build.properties
rename to src/main/cpp/build.properties
diff --git a/build.xml b/src/main/cpp/build.xml
similarity index 100%
rename from build.xml
rename to src/main/cpp/build.xml
diff --git a/cleaner/unix/src/cleaner.sh b/src/main/cpp/cleaner/unix/src/cleaner.sh
similarity index 100%
rename from cleaner/unix/src/cleaner.sh
rename to src/main/cpp/cleaner/unix/src/cleaner.sh
diff --git a/cleaner/windows/Makefile b/src/main/cpp/cleaner/windows/Makefile
similarity index 100%
rename from cleaner/windows/Makefile
rename to src/main/cpp/cleaner/windows/Makefile
diff --git a/cleaner/windows/Makefile-vc b/src/main/cpp/cleaner/windows/Makefile-vc
similarity index 100%
rename from cleaner/windows/Makefile-vc
rename to src/main/cpp/cleaner/windows/Makefile-vc
diff --git a/cleaner/windows/nbproject/configurations.xml b/src/main/cpp/cleaner/windows/nbproject/configurations.xml
similarity index 100%
rename from cleaner/windows/nbproject/configurations.xml
rename to src/main/cpp/cleaner/windows/nbproject/configurations.xml
diff --git a/cleaner/windows/nbproject/project.properties b/src/main/cpp/cleaner/windows/nbproject/project.properties
similarity index 100%
rename from cleaner/windows/nbproject/project.properties
rename to src/main/cpp/cleaner/windows/nbproject/project.properties
diff --git a/cleaner/windows/nbproject/project.xml b/src/main/cpp/cleaner/windows/nbproject/project.xml
similarity index 100%
rename from cleaner/windows/nbproject/project.xml
rename to src/main/cpp/cleaner/windows/nbproject/project.xml
diff --git a/cleaner/windows/src/main.c b/src/main/cpp/cleaner/windows/src/main.c
similarity index 100%
rename from cleaner/windows/src/main.c
rename to src/main/cpp/cleaner/windows/src/main.c
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.ncb b/src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.ncb
similarity index 100%
rename from cleaner/windows/vcproject/NBI Native Cleaner.ncb
rename to src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.ncb
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.sln b/src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.sln
similarity index 100%
rename from cleaner/windows/vcproject/NBI Native Cleaner.sln
rename to src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.sln
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.suo b/src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.suo
similarity index 100%
rename from cleaner/windows/vcproject/NBI Native Cleaner.suo
rename to src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.suo
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.vcproj b/src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.vcproj
similarity index 100%
rename from cleaner/windows/vcproject/NBI Native Cleaner.vcproj
rename to src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.vcproj
diff --git a/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user b/src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user
similarity index 100%
rename from cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user
rename to src/main/cpp/cleaner/windows/vcproject/NBI Native Cleaner.vcproj.user
diff --git a/jnilib/.common/src/CommonUtils.c b/src/main/cpp/jnilib/.common/src/CommonUtils.c
similarity index 100%
rename from jnilib/.common/src/CommonUtils.c
rename to src/main/cpp/jnilib/.common/src/CommonUtils.c
diff --git a/jnilib/.common/src/CommonUtils.h b/src/main/cpp/jnilib/.common/src/CommonUtils.h
similarity index 100%
rename from jnilib/.common/src/CommonUtils.h
rename to src/main/cpp/jnilib/.common/src/CommonUtils.h
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.c b/src/main/cpp/jnilib/.unix/src/jni_UnixNativeUtils.c
similarity index 100%
rename from jnilib/.unix/src/jni_UnixNativeUtils.c
rename to src/main/cpp/jnilib/.unix/src/jni_UnixNativeUtils.c
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.h b/src/main/cpp/jnilib/.unix/src/jni_UnixNativeUtils.h
similarity index 100%
rename from jnilib/.unix/src/jni_UnixNativeUtils.h
rename to src/main/cpp/jnilib/.unix/src/jni_UnixNativeUtils.h
diff --git a/jnilib/linux/Makefile b/src/main/cpp/jnilib/linux/Makefile
similarity index 100%
rename from jnilib/linux/Makefile
rename to src/main/cpp/jnilib/linux/Makefile
diff --git a/jnilib/linux/nbproject/configurations.xml b/src/main/cpp/jnilib/linux/nbproject/configurations.xml
similarity index 100%
rename from jnilib/linux/nbproject/configurations.xml
rename to src/main/cpp/jnilib/linux/nbproject/configurations.xml
diff --git a/jnilib/linux/nbproject/project.properties b/src/main/cpp/jnilib/linux/nbproject/project.properties
similarity index 100%
rename from jnilib/linux/nbproject/project.properties
rename to src/main/cpp/jnilib/linux/nbproject/project.properties
diff --git a/jnilib/linux/nbproject/project.xml b/src/main/cpp/jnilib/linux/nbproject/project.xml
similarity index 100%
rename from jnilib/linux/nbproject/project.xml
rename to src/main/cpp/jnilib/linux/nbproject/project.xml
diff --git a/jnilib/macosx/Makefile b/src/main/cpp/jnilib/macosx/Makefile
similarity index 100%
rename from jnilib/macosx/Makefile
rename to src/main/cpp/jnilib/macosx/Makefile
diff --git a/jnilib/macosx/nbproject/configurations.xml b/src/main/cpp/jnilib/macosx/nbproject/configurations.xml
similarity index 100%
rename from jnilib/macosx/nbproject/configurations.xml
rename to src/main/cpp/jnilib/macosx/nbproject/configurations.xml
diff --git a/jnilib/macosx/nbproject/project.properties b/src/main/cpp/jnilib/macosx/nbproject/project.properties
similarity index 100%
rename from jnilib/macosx/nbproject/project.properties
rename to src/main/cpp/jnilib/macosx/nbproject/project.properties
diff --git a/jnilib/macosx/nbproject/project.xml b/src/main/cpp/jnilib/macosx/nbproject/project.xml
similarity index 100%
rename from jnilib/macosx/nbproject/project.xml
rename to src/main/cpp/jnilib/macosx/nbproject/project.xml
diff --git a/jnilib/solaris-sparc/Makefile b/src/main/cpp/jnilib/solaris-sparc/Makefile
similarity index 100%
rename from jnilib/solaris-sparc/Makefile
rename to src/main/cpp/jnilib/solaris-sparc/Makefile
diff --git a/jnilib/solaris-sparc/nbproject/configurations.xml b/src/main/cpp/jnilib/solaris-sparc/nbproject/configurations.xml
similarity index 100%
rename from jnilib/solaris-sparc/nbproject/configurations.xml
rename to src/main/cpp/jnilib/solaris-sparc/nbproject/configurations.xml
diff --git a/jnilib/solaris-sparc/nbproject/project.properties b/src/main/cpp/jnilib/solaris-sparc/nbproject/project.properties
similarity index 100%
rename from jnilib/solaris-sparc/nbproject/project.properties
rename to src/main/cpp/jnilib/solaris-sparc/nbproject/project.properties
diff --git a/jnilib/solaris-sparc/nbproject/project.xml b/src/main/cpp/jnilib/solaris-sparc/nbproject/project.xml
similarity index 100%
rename from jnilib/solaris-sparc/nbproject/project.xml
rename to src/main/cpp/jnilib/solaris-sparc/nbproject/project.xml
diff --git a/jnilib/solaris-x86/Makefile b/src/main/cpp/jnilib/solaris-x86/Makefile
similarity index 100%
rename from jnilib/solaris-x86/Makefile
rename to src/main/cpp/jnilib/solaris-x86/Makefile
diff --git a/jnilib/solaris-x86/nbproject/configurations.xml b/src/main/cpp/jnilib/solaris-x86/nbproject/configurations.xml
similarity index 100%
rename from jnilib/solaris-x86/nbproject/configurations.xml
rename to src/main/cpp/jnilib/solaris-x86/nbproject/configurations.xml
diff --git a/jnilib/solaris-x86/nbproject/project.properties b/src/main/cpp/jnilib/solaris-x86/nbproject/project.properties
similarity index 100%
rename from jnilib/solaris-x86/nbproject/project.properties
rename to src/main/cpp/jnilib/solaris-x86/nbproject/project.properties
diff --git a/jnilib/solaris-x86/nbproject/project.xml b/src/main/cpp/jnilib/solaris-x86/nbproject/project.xml
similarity index 100%
rename from jnilib/solaris-x86/nbproject/project.xml
rename to src/main/cpp/jnilib/solaris-x86/nbproject/project.xml
diff --git a/jnilib/windows/Makefile b/src/main/cpp/jnilib/windows/Makefile
similarity index 100%
rename from jnilib/windows/Makefile
rename to src/main/cpp/jnilib/windows/Makefile
diff --git a/jnilib/windows/Makefile-vc b/src/main/cpp/jnilib/windows/Makefile-vc
similarity index 100%
rename from jnilib/windows/Makefile-vc
rename to src/main/cpp/jnilib/windows/Makefile-vc
diff --git a/jnilib/windows/Makefile-vc-wo-crt b/src/main/cpp/jnilib/windows/Makefile-vc-wo-crt
similarity index 100%
rename from jnilib/windows/Makefile-vc-wo-crt
rename to src/main/cpp/jnilib/windows/Makefile-vc-wo-crt
diff --git a/jnilib/windows/nbproject/configurations.xml b/src/main/cpp/jnilib/windows/nbproject/configurations.xml
similarity index 100%
rename from jnilib/windows/nbproject/configurations.xml
rename to src/main/cpp/jnilib/windows/nbproject/configurations.xml
diff --git a/jnilib/windows/nbproject/project.properties b/src/main/cpp/jnilib/windows/nbproject/project.properties
similarity index 100%
rename from jnilib/windows/nbproject/project.properties
rename to src/main/cpp/jnilib/windows/nbproject/project.properties
diff --git a/jnilib/windows/nbproject/project.xml b/src/main/cpp/jnilib/windows/nbproject/project.xml
similarity index 100%
rename from jnilib/windows/nbproject/project.xml
rename to src/main/cpp/jnilib/windows/nbproject/project.xml
diff --git a/jnilib/windows/src/WindowsUtils.c b/src/main/cpp/jnilib/windows/src/WindowsUtils.c
similarity index 100%
rename from jnilib/windows/src/WindowsUtils.c
rename to src/main/cpp/jnilib/windows/src/WindowsUtils.c
diff --git a/jnilib/windows/src/WindowsUtils.h b/src/main/cpp/jnilib/windows/src/WindowsUtils.h
similarity index 100%
rename from jnilib/windows/src/WindowsUtils.h
rename to src/main/cpp/jnilib/windows/src/WindowsUtils.h
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.c b/src/main/cpp/jnilib/windows/src/jni_WindowsNativeUtils.c
similarity index 100%
rename from jnilib/windows/src/jni_WindowsNativeUtils.c
rename to src/main/cpp/jnilib/windows/src/jni_WindowsNativeUtils.c
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.h b/src/main/cpp/jnilib/windows/src/jni_WindowsNativeUtils.h
similarity index 100%
rename from jnilib/windows/src/jni_WindowsNativeUtils.h
rename to src/main/cpp/jnilib/windows/src/jni_WindowsNativeUtils.h
diff --git a/jnilib/windows/src/jni_WindowsRegistry.c b/src/main/cpp/jnilib/windows/src/jni_WindowsRegistry.c
similarity index 100%
rename from jnilib/windows/src/jni_WindowsRegistry.c
rename to src/main/cpp/jnilib/windows/src/jni_WindowsRegistry.c
diff --git a/jnilib/windows/src/jni_WindowsRegistry.h b/src/main/cpp/jnilib/windows/src/jni_WindowsRegistry.h
similarity index 100%
rename from jnilib/windows/src/jni_WindowsRegistry.h
rename to src/main/cpp/jnilib/windows/src/jni_WindowsRegistry.h
diff --git a/jnilib/windows/vcproject/NBI JNI Library.ncb b/src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.ncb
similarity index 100%
rename from jnilib/windows/vcproject/NBI JNI Library.ncb
rename to src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.ncb
diff --git a/jnilib/windows/vcproject/NBI JNI Library.sln b/src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.sln
similarity index 100%
rename from jnilib/windows/vcproject/NBI JNI Library.sln
rename to src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.sln
diff --git a/jnilib/windows/vcproject/NBI JNI Library.suo b/src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.suo
similarity index 100%
rename from jnilib/windows/vcproject/NBI JNI Library.suo
rename to src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.suo
diff --git a/jnilib/windows/vcproject/NBI JNI Library.vcproj b/src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.vcproj
similarity index 100%
rename from jnilib/windows/vcproject/NBI JNI Library.vcproj
rename to src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.vcproj
diff --git a/jnilib/windows/vcproject/NBI JNI Library.vcproj.user b/src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.vcproj.user
similarity index 100%
rename from jnilib/windows/vcproject/NBI JNI Library.vcproj.user
rename to src/main/cpp/jnilib/windows/vcproject/NBI JNI Library.vcproj.user
diff --git a/jnilib/windows/vcproject/vc80.idb b/src/main/cpp/jnilib/windows/vcproject/vc80.idb
similarity index 100%
rename from jnilib/windows/vcproject/vc80.idb
rename to src/main/cpp/jnilib/windows/vcproject/vc80.idb
diff --git a/launcher/unix/i18n/launcher.properties b/src/main/cpp/launcher/unix/i18n/launcher.properties
similarity index 100%
rename from launcher/unix/i18n/launcher.properties
rename to src/main/cpp/launcher/unix/i18n/launcher.properties
diff --git a/launcher/unix/src/launcher.sh b/src/main/cpp/launcher/unix/src/launcher.sh
similarity index 100%
rename from launcher/unix/src/launcher.sh
rename to src/main/cpp/launcher/unix/src/launcher.sh
diff --git a/launcher/windows/.dep.inc b/src/main/cpp/launcher/windows/.dep.inc
similarity index 100%
rename from launcher/windows/.dep.inc
rename to src/main/cpp/launcher/windows/.dep.inc
diff --git a/launcher/windows/Makefile b/src/main/cpp/launcher/windows/Makefile
similarity index 100%
rename from launcher/windows/Makefile
rename to src/main/cpp/launcher/windows/Makefile
diff --git a/launcher/windows/Makefile-vc b/src/main/cpp/launcher/windows/Makefile-vc
similarity index 100%
rename from launcher/windows/Makefile-vc
rename to src/main/cpp/launcher/windows/Makefile-vc
diff --git a/launcher/windows/Makefile-vc-wo-crt b/src/main/cpp/launcher/windows/Makefile-vc-wo-crt
similarity index 100%
rename from launcher/windows/Makefile-vc-wo-crt
rename to src/main/cpp/launcher/windows/Makefile-vc-wo-crt
diff --git a/launcher/windows/i18n/launcher.properties b/src/main/cpp/launcher/windows/i18n/launcher.properties
similarity index 100%
rename from launcher/windows/i18n/launcher.properties
rename to src/main/cpp/launcher/windows/i18n/launcher.properties
diff --git a/launcher/windows/nbproject/configurations.xml b/src/main/cpp/launcher/windows/nbproject/configurations.xml
similarity index 100%
rename from launcher/windows/nbproject/configurations.xml
rename to src/main/cpp/launcher/windows/nbproject/configurations.xml
diff --git a/launcher/windows/nbproject/project.properties b/src/main/cpp/launcher/windows/nbproject/project.properties
similarity index 100%
rename from launcher/windows/nbproject/project.properties
rename to src/main/cpp/launcher/windows/nbproject/project.properties
diff --git a/launcher/windows/nbproject/project.xml b/src/main/cpp/launcher/windows/nbproject/project.xml
similarity index 100%
rename from launcher/windows/nbproject/project.xml
rename to src/main/cpp/launcher/windows/nbproject/project.xml
diff --git a/launcher/windows/resources/icon.ico b/src/main/cpp/launcher/windows/resources/icon.ico
similarity index 100%
rename from launcher/windows/resources/icon.ico
rename to src/main/cpp/launcher/windows/resources/icon.ico
diff --git a/launcher/windows/resources/nlw-alt.exe.manifest b/src/main/cpp/launcher/windows/resources/nlw-alt.exe.manifest
similarity index 100%
rename from launcher/windows/resources/nlw-alt.exe.manifest
rename to src/main/cpp/launcher/windows/resources/nlw-alt.exe.manifest
diff --git a/launcher/windows/resources/nlw.exe.manifest b/src/main/cpp/launcher/windows/resources/nlw.exe.manifest
similarity index 100%
rename from launcher/windows/resources/nlw.exe.manifest
rename to src/main/cpp/launcher/windows/resources/nlw.exe.manifest
diff --git a/launcher/windows/resources/res.rc b/src/main/cpp/launcher/windows/resources/res.rc
similarity index 100%
rename from launcher/windows/resources/res.rc
rename to src/main/cpp/launcher/windows/resources/res.rc
diff --git a/launcher/windows/src/Errors.h b/src/main/cpp/launcher/windows/src/Errors.h
similarity index 100%
rename from launcher/windows/src/Errors.h
rename to src/main/cpp/launcher/windows/src/Errors.h
diff --git a/launcher/windows/src/ExtractUtils.c b/src/main/cpp/launcher/windows/src/ExtractUtils.c
similarity index 100%
rename from launcher/windows/src/ExtractUtils.c
rename to src/main/cpp/launcher/windows/src/ExtractUtils.c
diff --git a/launcher/windows/src/ExtractUtils.h b/src/main/cpp/launcher/windows/src/ExtractUtils.h
similarity index 100%
rename from launcher/windows/src/ExtractUtils.h
rename to src/main/cpp/launcher/windows/src/ExtractUtils.h
diff --git a/launcher/windows/src/FileUtils.c b/src/main/cpp/launcher/windows/src/FileUtils.c
similarity index 100%
rename from launcher/windows/src/FileUtils.c
rename to src/main/cpp/launcher/windows/src/FileUtils.c
diff --git a/launcher/windows/src/FileUtils.h b/src/main/cpp/launcher/windows/src/FileUtils.h
similarity index 100%
rename from launcher/windows/src/FileUtils.h
rename to src/main/cpp/launcher/windows/src/FileUtils.h
diff --git a/launcher/windows/src/JavaUtils.c b/src/main/cpp/launcher/windows/src/JavaUtils.c
similarity index 100%
rename from launcher/windows/src/JavaUtils.c
rename to src/main/cpp/launcher/windows/src/JavaUtils.c
diff --git a/launcher/windows/src/JavaUtils.h b/src/main/cpp/launcher/windows/src/JavaUtils.h
similarity index 100%
rename from launcher/windows/src/JavaUtils.h
rename to src/main/cpp/launcher/windows/src/JavaUtils.h
diff --git a/launcher/windows/src/Launcher.c b/src/main/cpp/launcher/windows/src/Launcher.c
similarity index 100%
rename from launcher/windows/src/Launcher.c
rename to src/main/cpp/launcher/windows/src/Launcher.c
diff --git a/launcher/windows/src/Launcher.h b/src/main/cpp/launcher/windows/src/Launcher.h
similarity index 100%
rename from launcher/windows/src/Launcher.h
rename to src/main/cpp/launcher/windows/src/Launcher.h
diff --git a/launcher/windows/src/Main.c b/src/main/cpp/launcher/windows/src/Main.c
similarity index 100%
rename from launcher/windows/src/Main.c
rename to src/main/cpp/launcher/windows/src/Main.c
diff --git a/launcher/windows/src/Main.h b/src/main/cpp/launcher/windows/src/Main.h
similarity index 100%
rename from launcher/windows/src/Main.h
rename to src/main/cpp/launcher/windows/src/Main.h
diff --git a/launcher/windows/src/ProcessUtils.c b/src/main/cpp/launcher/windows/src/ProcessUtils.c
similarity index 100%
rename from launcher/windows/src/ProcessUtils.c
rename to src/main/cpp/launcher/windows/src/ProcessUtils.c
diff --git a/launcher/windows/src/ProcessUtils.h b/src/main/cpp/launcher/windows/src/ProcessUtils.h
similarity index 100%
rename from launcher/windows/src/ProcessUtils.h
rename to src/main/cpp/launcher/windows/src/ProcessUtils.h
diff --git a/launcher/windows/src/RegistryUtils.c b/src/main/cpp/launcher/windows/src/RegistryUtils.c
similarity index 100%
rename from launcher/windows/src/RegistryUtils.c
rename to src/main/cpp/launcher/windows/src/RegistryUtils.c
diff --git a/launcher/windows/src/RegistryUtils.h b/src/main/cpp/launcher/windows/src/RegistryUtils.h
similarity index 100%
rename from launcher/windows/src/RegistryUtils.h
rename to src/main/cpp/launcher/windows/src/RegistryUtils.h
diff --git a/launcher/windows/src/StringUtils.c b/src/main/cpp/launcher/windows/src/StringUtils.c
similarity index 100%
rename from launcher/windows/src/StringUtils.c
rename to src/main/cpp/launcher/windows/src/StringUtils.c
diff --git a/launcher/windows/src/StringUtils.h b/src/main/cpp/launcher/windows/src/StringUtils.h
similarity index 100%
rename from launcher/windows/src/StringUtils.h
rename to src/main/cpp/launcher/windows/src/StringUtils.h
diff --git a/launcher/windows/src/SystemUtils.c b/src/main/cpp/launcher/windows/src/SystemUtils.c
similarity index 100%
rename from launcher/windows/src/SystemUtils.c
rename to src/main/cpp/launcher/windows/src/SystemUtils.c
diff --git a/launcher/windows/src/SystemUtils.h b/src/main/cpp/launcher/windows/src/SystemUtils.h
similarity index 100%
rename from launcher/windows/src/SystemUtils.h
rename to src/main/cpp/launcher/windows/src/SystemUtils.h
diff --git a/launcher/windows/src/Types.h b/src/main/cpp/launcher/windows/src/Types.h
similarity index 100%
rename from launcher/windows/src/Types.h
rename to src/main/cpp/launcher/windows/src/Types.h
diff --git a/launcher/windows/vcproject/NBI Native Launcher.ncb b/src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.ncb
similarity index 100%
rename from launcher/windows/vcproject/NBI Native Launcher.ncb
rename to src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.ncb
diff --git a/launcher/windows/vcproject/NBI Native Launcher.sln b/src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.sln
similarity index 100%
rename from launcher/windows/vcproject/NBI Native Launcher.sln
rename to src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.sln
diff --git a/launcher/windows/vcproject/NBI Native Launcher.suo b/src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.suo
similarity index 100%
rename from launcher/windows/vcproject/NBI Native Launcher.suo
rename to src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.suo
diff --git a/launcher/windows/vcproject/NBI Native Launcher.vcproj b/src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj
similarity index 100%
rename from launcher/windows/vcproject/NBI Native Launcher.vcproj
rename to src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj
diff --git a/launcher/windows/vcproject/NBI Native Launcher.vcproj.SARD.dlm198383.user b/src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj.SARD.dlm198383.user
similarity index 100%
rename from launcher/windows/vcproject/NBI Native Launcher.vcproj.SARD.dlm198383.user
rename to src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj.SARD.dlm198383.user
diff --git a/launcher/windows/vcproject/NBI Native Launcher.vcproj.user b/src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj.user
similarity index 100%
rename from launcher/windows/vcproject/NBI Native Launcher.vcproj.user
rename to src/main/cpp/launcher/windows/vcproject/NBI Native Launcher.vcproj.user


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 03/19: [NETBEANS-161] Changed license header introducer to simple slash-star

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 2238d77bdfa3acf721851767676dd0bf07c46d87
Author: Lars Bruun-Hansen <lb...@gmail.com>
AuthorDate: Sun Nov 19 21:41:10 2017 +0100

    [NETBEANS-161] Changed license header introducer to simple slash-star
    
    The new Apache license header on all .java, .cpp, .c files (etc)
    started with slash-star-star (the Javadoc introducer). While strictly
    speaking this is acceptable, the header is not a Javadoc comment,
    and no present or future Javadoc parser should attempt to regard it
    as Javadoc comment. Therefore all such occurrences are changed to
    simple slash-star introducer.
---
 cleaner/windows/src/main.c                  | 2 +-
 jnilib/.common/src/CommonUtils.c            | 2 +-
 jnilib/.common/src/CommonUtils.h            | 2 +-
 jnilib/.unix/src/jni_UnixNativeUtils.c      | 2 +-
 jnilib/.unix/src/jni_UnixNativeUtils.h      | 2 +-
 jnilib/windows/src/WindowsUtils.c           | 2 +-
 jnilib/windows/src/WindowsUtils.h           | 2 +-
 jnilib/windows/src/jni_WindowsNativeUtils.c | 2 +-
 jnilib/windows/src/jni_WindowsNativeUtils.h | 2 +-
 jnilib/windows/src/jni_WindowsRegistry.c    | 2 +-
 jnilib/windows/src/jni_WindowsRegistry.h    | 2 +-
 launcher/windows/resources/res.rc           | 2 +-
 launcher/windows/src/Errors.h               | 2 +-
 launcher/windows/src/ExtractUtils.c         | 2 +-
 launcher/windows/src/ExtractUtils.h         | 2 +-
 launcher/windows/src/FileUtils.c            | 2 +-
 launcher/windows/src/FileUtils.h            | 2 +-
 launcher/windows/src/JavaUtils.c            | 2 +-
 launcher/windows/src/JavaUtils.h            | 2 +-
 launcher/windows/src/Launcher.c             | 2 +-
 launcher/windows/src/Launcher.h             | 2 +-
 launcher/windows/src/Main.c                 | 2 +-
 launcher/windows/src/Main.h                 | 2 +-
 launcher/windows/src/ProcessUtils.c         | 2 +-
 launcher/windows/src/ProcessUtils.h         | 2 +-
 launcher/windows/src/RegistryUtils.c        | 2 +-
 launcher/windows/src/RegistryUtils.h        | 2 +-
 launcher/windows/src/StringUtils.c          | 2 +-
 launcher/windows/src/StringUtils.h          | 2 +-
 launcher/windows/src/SystemUtils.c          | 2 +-
 launcher/windows/src/SystemUtils.h          | 2 +-
 launcher/windows/src/Types.h                | 2 +-
 32 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/cleaner/windows/src/main.c b/cleaner/windows/src/main.c
index 2743377..a94a094 100644
--- a/cleaner/windows/src/main.c
+++ b/cleaner/windows/src/main.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/.common/src/CommonUtils.c b/jnilib/.common/src/CommonUtils.c
index 3984628..b66eccd 100644
--- a/jnilib/.common/src/CommonUtils.c
+++ b/jnilib/.common/src/CommonUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/.common/src/CommonUtils.h b/jnilib/.common/src/CommonUtils.h
index b11aacd..8824351 100644
--- a/jnilib/.common/src/CommonUtils.h
+++ b/jnilib/.common/src/CommonUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.c b/jnilib/.unix/src/jni_UnixNativeUtils.c
index 24da65d..437e270 100644
--- a/jnilib/.unix/src/jni_UnixNativeUtils.c
+++ b/jnilib/.unix/src/jni_UnixNativeUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/.unix/src/jni_UnixNativeUtils.h b/jnilib/.unix/src/jni_UnixNativeUtils.h
index 654e750..989e05d 100644
--- a/jnilib/.unix/src/jni_UnixNativeUtils.h
+++ b/jnilib/.unix/src/jni_UnixNativeUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/windows/src/WindowsUtils.c b/jnilib/windows/src/WindowsUtils.c
index ed5d835..fe4972d 100644
--- a/jnilib/windows/src/WindowsUtils.c
+++ b/jnilib/windows/src/WindowsUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/windows/src/WindowsUtils.h b/jnilib/windows/src/WindowsUtils.h
index eaa2aeb..947c63e 100644
--- a/jnilib/windows/src/WindowsUtils.h
+++ b/jnilib/windows/src/WindowsUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.c b/jnilib/windows/src/jni_WindowsNativeUtils.c
index b21da67..6d7c60b 100644
--- a/jnilib/windows/src/jni_WindowsNativeUtils.c
+++ b/jnilib/windows/src/jni_WindowsNativeUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/windows/src/jni_WindowsNativeUtils.h b/jnilib/windows/src/jni_WindowsNativeUtils.h
index d673d94..9ea87e7 100644
--- a/jnilib/windows/src/jni_WindowsNativeUtils.h
+++ b/jnilib/windows/src/jni_WindowsNativeUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/windows/src/jni_WindowsRegistry.c b/jnilib/windows/src/jni_WindowsRegistry.c
index a157477..524a166 100644
--- a/jnilib/windows/src/jni_WindowsRegistry.c
+++ b/jnilib/windows/src/jni_WindowsRegistry.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/jnilib/windows/src/jni_WindowsRegistry.h b/jnilib/windows/src/jni_WindowsRegistry.h
index 05a144a..1bf9add 100644
--- a/jnilib/windows/src/jni_WindowsRegistry.h
+++ b/jnilib/windows/src/jni_WindowsRegistry.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/resources/res.rc b/launcher/windows/resources/res.rc
index b501640..012c85e 100644
--- a/launcher/windows/resources/res.rc
+++ b/launcher/windows/resources/res.rc
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/Errors.h b/launcher/windows/src/Errors.h
index 50a2409..7955823 100644
--- a/launcher/windows/src/Errors.h
+++ b/launcher/windows/src/Errors.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/ExtractUtils.c b/launcher/windows/src/ExtractUtils.c
index d96f40c..edbfa55 100644
--- a/launcher/windows/src/ExtractUtils.c
+++ b/launcher/windows/src/ExtractUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/ExtractUtils.h b/launcher/windows/src/ExtractUtils.h
index 98655b0..f816df8 100644
--- a/launcher/windows/src/ExtractUtils.h
+++ b/launcher/windows/src/ExtractUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/FileUtils.c b/launcher/windows/src/FileUtils.c
index 5ab272a..6c36fd6 100644
--- a/launcher/windows/src/FileUtils.c
+++ b/launcher/windows/src/FileUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/FileUtils.h b/launcher/windows/src/FileUtils.h
index 60db47b..0b01ace 100644
--- a/launcher/windows/src/FileUtils.h
+++ b/launcher/windows/src/FileUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/JavaUtils.c b/launcher/windows/src/JavaUtils.c
index 0f1a1dd..4fbf7f9 100644
--- a/launcher/windows/src/JavaUtils.c
+++ b/launcher/windows/src/JavaUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/JavaUtils.h b/launcher/windows/src/JavaUtils.h
index 4508085..fa9109d 100644
--- a/launcher/windows/src/JavaUtils.h
+++ b/launcher/windows/src/JavaUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/Launcher.c b/launcher/windows/src/Launcher.c
index 4c756f7..95bdcbd 100644
--- a/launcher/windows/src/Launcher.c
+++ b/launcher/windows/src/Launcher.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/Launcher.h b/launcher/windows/src/Launcher.h
index b3d827f..d062795 100644
--- a/launcher/windows/src/Launcher.h
+++ b/launcher/windows/src/Launcher.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/Main.c b/launcher/windows/src/Main.c
index dbb3c5d..5a819ee 100644
--- a/launcher/windows/src/Main.c
+++ b/launcher/windows/src/Main.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/Main.h b/launcher/windows/src/Main.h
index bfe0ee1..57c81ef 100644
--- a/launcher/windows/src/Main.h
+++ b/launcher/windows/src/Main.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/ProcessUtils.c b/launcher/windows/src/ProcessUtils.c
index 9abab4c..0fcd9dd 100644
--- a/launcher/windows/src/ProcessUtils.c
+++ b/launcher/windows/src/ProcessUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/ProcessUtils.h b/launcher/windows/src/ProcessUtils.h
index cc5859b..f553b20 100644
--- a/launcher/windows/src/ProcessUtils.h
+++ b/launcher/windows/src/ProcessUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/RegistryUtils.c b/launcher/windows/src/RegistryUtils.c
index e7d537d..e60bd60 100644
--- a/launcher/windows/src/RegistryUtils.c
+++ b/launcher/windows/src/RegistryUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/RegistryUtils.h b/launcher/windows/src/RegistryUtils.h
index 4ca8db4..c9851b0 100644
--- a/launcher/windows/src/RegistryUtils.h
+++ b/launcher/windows/src/RegistryUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/StringUtils.c b/launcher/windows/src/StringUtils.c
index 306d9bd..cf0423b 100644
--- a/launcher/windows/src/StringUtils.c
+++ b/launcher/windows/src/StringUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/StringUtils.h b/launcher/windows/src/StringUtils.h
index ecf0938..9cf775c 100644
--- a/launcher/windows/src/StringUtils.h
+++ b/launcher/windows/src/StringUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/SystemUtils.c b/launcher/windows/src/SystemUtils.c
index 41f0dbf..c8b423e 100644
--- a/launcher/windows/src/SystemUtils.c
+++ b/launcher/windows/src/SystemUtils.c
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/SystemUtils.h b/launcher/windows/src/SystemUtils.h
index f375398..69437f8 100644
--- a/launcher/windows/src/SystemUtils.h
+++ b/launcher/windows/src/SystemUtils.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
diff --git a/launcher/windows/src/Types.h b/launcher/windows/src/Types.h
index 379bff6..9fea21c 100644
--- a/launcher/windows/src/Types.h
+++ b/launcher/windows/src/Types.h
@@ -1,4 +1,4 @@
-/**
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 16/19: initial code for installers

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit f77603aed4fcc9019229e011c8588a9b2806fdec
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Mon Oct 24 15:53:23 2022 +0200

    initial code for installers
---
 .asf.yaml          |  34 +++++++++
 .gitignore         |   2 +
 Jenkinsfile.groovy | 102 ++++++++++++++++++++++++++
 LICENSE            | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 NOTICE             |  13 ++++
 README.md          |  47 ++++++++++++
 pom.xml            | 143 ++++++++++++++++++++++++++++++++++++
 7 files changed, 549 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0000000..80cb778
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,34 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+github:
+  description: "Apache NetBeans Native Installers"
+  homepage: https://netbeans.apache.org/
+  labels:
+    - netbeans
+    - native
+  features:
+    wiki: false
+    issues: false
+    projects: false
+  enabled_merge_buttons:
+    squash:  true
+    merge:   true
+    rebase:  true
+notifications:
+    commits:      commits@netbeans.apache.org
+    issues:       notifications@netbeans.apache.org
+    pullrequests: notifications@netbeans.apache.org
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..41d77da
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/target/
+/nb-configuration.xml
\ No newline at end of file
diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy
new file mode 100644
index 0000000..9c91c89
--- /dev/null
+++ b/Jenkinsfile.groovy
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+pipeline {
+    agent any
+    triggers {
+        pollSCM('H/5 * * * * ')
+    }
+    options {
+        buildDiscarder(logRotator(numToKeepStr: '3'))
+        disableConcurrentBuilds() 
+    }
+    stages{
+        stage("Build with jdk 8 ") {
+            agent { node { label 'ubuntu' } }
+            options { timeout(time: 120, unit: 'MINUTES') }                
+            steps{
+                mavenBuild( 'jdk_1.8_latest', 'clean install deploy', 'maven_3.6.3', [artifactsPublisher(disabled: false)])        
+            }
+        }
+    }
+    post {
+        always {
+            cleanWs() // deleteDirs: true, notFailBuild: true, patterns: [[pattern: '**/.repository/**', type: 'INCLUDE']]
+        }
+        unstable {
+            script{
+                notifyBuild( "Unstable Build ")
+            }
+        }
+        failure {
+            script{
+                notifyBuild( "Error in build ")
+            }
+        }
+        success {
+            script {
+                def previousResult = currentBuild.previousBuild?.result
+                if (previousResult && !currentBuild.resultIsWorseOrEqualTo( previousResult ) ) {
+                    notifyBuild( "Fixed" )
+                }
+            }
+        }
+    }
+}
+
+
+def mavenBuild(jdk, cmdline, mvnName, publishers) {
+    def localRepo = "../.maven_repositories/${env.EXECUTOR_NUMBER}" // ".repository" //
+    //def settingsName = 'archiva-uid-jenkins'
+    def mavenOpts = '-Xms1g -Xmx4g -Djava.awt.headless=true'
+
+    withMaven(
+        maven: mvnName,
+        jdk: "$jdk",
+        options: publishers,
+        publisherStrategy: 'EXPLICIT',
+        //globalMavenSettingsConfig: settingsName,
+        mavenOpts: mavenOpts,
+        mavenLocalRepo: localRepo) {
+        // Some common Maven command line + provided command line
+        sh "mvn -V -B -U -e -DskipBrowserTests -Dmaven.test.failure.ignore=true $cmdline "
+   }
+}
+
+def notifyBuild(String buildStatus) {
+    // default the value
+    buildStatus = buildStatus ?: "UNKNOWN"
+    def color
+    if (buildStatus == 'STARTED') {
+        color = '#F0F0F0'
+    } else if (buildStatus == 'SUCCESS' || buildStatus=='Fixed') {
+        color = '#00FF00'
+    } else if (buildStatus == 'UNSTABLE') {
+        color = '#ffff50'
+    } else if (buildStatus == 'UNKNOWN') {
+        color = '#a0a0a0'
+    }else {
+        color = '#FF0000'
+    }
+    slackSend (channel:'#netbeans-builds', message:"${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL}) ",color: color)
+     
+
+     
+}
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..aeb123f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,208 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+********************************************************************************
+Apache NetBeans repository includes a number of source files that are not
+covered by the Apache license. These files are refered to by licenseinfo.xml
+files which hold the license information.
+********************************************************************************
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..aa76cb6
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,13 @@
+Apache NetBeans Native Installers
+Copyright 2017-2022 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+The code is based on NetBeans, that has been kindly donated to the Apache
+Software Foundation by Oracle.
+
+The code was Copyright 1997-2016 Oracle and/or its affiliates.  The Initial
+Developer of the Original Software was Sun Microsystems, Inc. Portions
+Copyright 1997-2006 Sun Microsystems, Inc.
+
diff --git a/README.md b/README.md
new file mode 100755
index 0000000..976d60f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,47 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+# Apache NetBeans Native Launchers
+
+## 
+
+To build binaries, only Linux OS is known to work, using the MinGW project. On Ubuntu,
+this may work to install suitable MinGW:
+
+```
+$ apt install mingw-w64 mingw-w64-tools
+```
+
+The command to build the launchers:
+
+```
+$ mvn clean install
+```
+
+## Get In Touch
+
+[Subscribe](mailto:users-subscribe@netbeans.apache.org) or [mail](mailto:users@netbeans.apache.org) the [users@netbeans.apache.org](mailto:users@netbeans.apache.org) list - Ask questions, find answers, and also help other users.
+
+[Subscribe](mailto:dev-subscribe@netbeans.apache.org) or [mail](mailto:dev@netbeans.apache.org) the [dev@netbeans.apache.org](mailto:dev@netbeans.apache.org) list - Join developement discussions, propose new ideas and connect with contributors.
+
+## Reporting Bugs
+
+Use our main repository issue reporting https://github.com/apache/netbeans/issues
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..e340b4f
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.netbeans</groupId>
+        <artifactId>netbeans-parent</artifactId>
+        <version>2</version>
+    </parent>
+    <groupId>org.apache.netbeans.native</groupId>
+    <version>12.6-SNAPSHOT</version>
+
+    <artifactId>installers</artifactId>
+    <packaging>jar</packaging>
+     <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/netbeans-native-installers.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/netbeans-native-installers.git</developerConnection>
+        <url>https://github.com/apache/netbeans-native-launchers</url>
+        <tag>master</tag>
+    </scm> 
+    <name>Apache NetBeans Installers</name>
+    <description>
+   
+    </description> 
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>apachenetbeansdev</id>
+            <name>Apache NetBeans Dev Mailing List</name>
+            <email>dev@netbeans.apache.org</email>
+        </developer>
+    </developers>
+    <url>https://netbeans.apache.org/</url>
+
+    <properties>
+        <skipTests>true</skipTests>
+    </properties>
+  
+    <build>
+        <plugins>
+            <plugin>        
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>3.0.0</version>  
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target> 
+                                <!--
+                                <exec executable="make" dir="src/main/cleaner">
+                                    <arg value="-f" />
+                                    <arg value="Makefile.mingw" />
+                                </exec>
+                                <exec executable="make" dir="src/main/cpp/ide">
+                                    <arg value="-f" />
+                                    <arg value="Makefile.mingw" />
+                                </exec>
+                                <exec executable="make" dir="src/main/cpp/harness">
+                                    <arg value="-f" />
+                                    <arg value="Makefile.mingw" />
+                                </exec> 
+                                -->
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>default-jar</id>
+                        <phase>none</phase>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>3.2.0</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/main/cpp</source> 
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>create-distribution</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/assembly/assembly.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 19/19: Merge pull request #2 from ebarboni/initcommit

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 40d5d12d26cfb184a1815a96c215497848d3bb79
Merge: f77603a 33fa472
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Thu Dec 8 14:14:26 2022 +0100

    Merge pull request #2 from ebarboni/initcommit
    
    Initial commit preserving history

 src/main/cpp/build.properties                      |   68 +
 src/main/cpp/build.xml                             |  146 ++
 src/main/cpp/cleaner/unix/src/cleaner.sh           |   92 ++
 src/main/cpp/cleaner/windows/Makefile              |   79 +
 src/main/cpp/cleaner/windows/Makefile-vc           |   59 +
 .../cleaner/windows/nbproject/configurations.xml   |   97 ++
 .../cleaner/windows/nbproject/project.properties   |   20 +
 src/main/cpp/cleaner/windows/nbproject/project.xml |   31 +
 src/main/cpp/cleaner/windows/src/main.c            |  482 ++++++
 .../windows/vcproject/NBI Native Cleaner.ncb       |    1 +
 .../windows/vcproject/NBI Native Cleaner.sln       |   20 +
 .../windows/vcproject/NBI Native Cleaner.suo       |  Bin 0 -> 33280 bytes
 .../windows/vcproject/NBI Native Cleaner.vcproj    |  209 +++
 .../vcproject/NBI Native Cleaner.vcproj.user       |    1 +
 src/main/cpp/jnilib/.common/src/CommonUtils.c      |  384 +++++
 src/main/cpp/jnilib/.common/src/CommonUtils.h      |  122 ++
 .../cpp/jnilib/.unix/src/jni_UnixNativeUtils.c     |  108 ++
 .../cpp/jnilib/.unix/src/jni_UnixNativeUtils.h     |   83 +
 src/main/cpp/jnilib/linux/Makefile                 |  109 ++
 .../cpp/jnilib/linux/nbproject/configurations.xml  |  183 +++
 .../cpp/jnilib/linux/nbproject/project.properties  |   20 +
 src/main/cpp/jnilib/linux/nbproject/project.xml    |   31 +
 src/main/cpp/jnilib/macosx/Makefile                |  109 ++
 .../cpp/jnilib/macosx/nbproject/configurations.xml |  125 ++
 .../cpp/jnilib/macosx/nbproject/project.properties |   20 +
 src/main/cpp/jnilib/macosx/nbproject/project.xml   |   31 +
 src/main/cpp/jnilib/solaris-sparc/Makefile         |  109 ++
 .../solaris-sparc/nbproject/configurations.xml     |  283 ++++
 .../solaris-sparc/nbproject/project.properties     |   20 +
 .../cpp/jnilib/solaris-sparc/nbproject/project.xml |   31 +
 src/main/cpp/jnilib/solaris-x86/Makefile           |  109 ++
 .../solaris-x86/nbproject/configurations.xml       |  283 ++++
 .../solaris-x86/nbproject/project.properties       |   20 +
 .../cpp/jnilib/solaris-x86/nbproject/project.xml   |   31 +
 src/main/cpp/jnilib/windows/Makefile               |  109 ++
 src/main/cpp/jnilib/windows/Makefile-vc            |   76 +
 src/main/cpp/jnilib/windows/Makefile-vc-wo-crt     |   79 +
 .../jnilib/windows/nbproject/configurations.xml    |  179 +++
 .../jnilib/windows/nbproject/project.properties    |   20 +
 src/main/cpp/jnilib/windows/nbproject/project.xml  |   31 +
 src/main/cpp/jnilib/windows/src/WindowsUtils.c     |  146 ++
 src/main/cpp/jnilib/windows/src/WindowsUtils.h     |   48 +
 .../jnilib/windows/src/jni_WindowsNativeUtils.c    |  400 +++++
 .../jnilib/windows/src/jni_WindowsNativeUtils.h    |  109 ++
 .../cpp/jnilib/windows/src/jni_WindowsRegistry.c   |  632 ++++++++
 .../cpp/jnilib/windows/src/jni_WindowsRegistry.h   |  266 ++++
 .../jnilib/windows/vcproject/NBI JNI Library.ncb   |    1 +
 .../jnilib/windows/vcproject/NBI JNI Library.sln   |   20 +
 .../jnilib/windows/vcproject/NBI JNI Library.suo   |  Bin 0 -> 13824 bytes
 .../windows/vcproject/NBI JNI Library.vcproj       |  261 +++
 .../windows/vcproject/NBI JNI Library.vcproj.user  |    1 +
 src/main/cpp/jnilib/windows/vcproject/vc80.idb     |  Bin 0 -> 11264 bytes
 .../cpp/launcher/unix/i18n/launcher.properties     |   51 +
 src/main/cpp/launcher/unix/src/launcher.sh         | 1665 ++++++++++++++++++++
 src/main/cpp/launcher/windows/.dep.inc             |    5 +
 src/main/cpp/launcher/windows/Makefile             |  109 ++
 src/main/cpp/launcher/windows/Makefile-vc          |   92 ++
 src/main/cpp/launcher/windows/Makefile-vc-wo-crt   |   92 ++
 .../cpp/launcher/windows/i18n/launcher.properties  |   54 +
 .../launcher/windows/nbproject/configurations.xml  |  107 ++
 .../launcher/windows/nbproject/project.properties  |   20 +
 .../cpp/launcher/windows/nbproject/project.xml     |   46 +
 src/main/cpp/launcher/windows/resources/icon.ico   |  Bin 0 -> 99678 bytes
 .../windows/resources/nlw-alt.exe.manifest         |   31 +
 .../launcher/windows/resources/nlw.exe.manifest    |   31 +
 src/main/cpp/launcher/windows/resources/res.rc     |   39 +
 src/main/cpp/launcher/windows/src/Errors.h         |   52 +
 src/main/cpp/launcher/windows/src/ExtractUtils.c   |  761 +++++++++
 src/main/cpp/launcher/windows/src/ExtractUtils.h   |   50 +
 src/main/cpp/launcher/windows/src/FileUtils.c      |  593 +++++++
 src/main/cpp/launcher/windows/src/FileUtils.h      |   68 +
 src/main/cpp/launcher/windows/src/JavaUtils.c      |  796 ++++++++++
 src/main/cpp/launcher/windows/src/JavaUtils.h      |   64 +
 src/main/cpp/launcher/windows/src/Launcher.c       | 1009 ++++++++++++
 src/main/cpp/launcher/windows/src/Launcher.h       |   53 +
 src/main/cpp/launcher/windows/src/Main.c           |  672 ++++++++
 src/main/cpp/launcher/windows/src/Main.h           |   58 +
 src/main/cpp/launcher/windows/src/ProcessUtils.c   |  221 +++
 src/main/cpp/launcher/windows/src/ProcessUtils.h   |   48 +
 src/main/cpp/launcher/windows/src/RegistryUtils.c  |   60 +
 src/main/cpp/launcher/windows/src/RegistryUtils.h  |   44 +
 src/main/cpp/launcher/windows/src/StringUtils.c    |  794 ++++++++++
 src/main/cpp/launcher/windows/src/StringUtils.h    |  149 ++
 src/main/cpp/launcher/windows/src/SystemUtils.c    |  100 ++
 src/main/cpp/launcher/windows/src/SystemUtils.h    |   44 +
 src/main/cpp/launcher/windows/src/Types.h          |  155 ++
 .../windows/vcproject/NBI Native Launcher.ncb      |    1 +
 .../windows/vcproject/NBI Native Launcher.sln      |   17 +
 .../windows/vcproject/NBI Native Launcher.suo      |  Bin 0 -> 50176 bytes
 .../windows/vcproject/NBI Native Launcher.vcproj   |  304 ++++
 .../NBI Native Launcher.vcproj.SARD.dlm198383.user |   65 +
 .../vcproject/NBI Native Launcher.vcproj.user      |    1 +
 92 files changed, 14415 insertions(+)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 15/19: Revert PR4025 "Open clean up code base to remove Windows 95 & 98 support.." due to compile time constant changes.

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit e10fbb5bf822aa4bb6bd4307906a40ffdc7cb266
Author: Neil C Smith <ne...@apache.org>
AuthorDate: Fri Aug 12 09:13:41 2022 +0100

    Revert PR4025 "Open clean up code base to remove Windows 95 & 98 support.." due to compile time constant changes.
    
    This reverts commit 20818f45e3296e33838612592ff10c9f2157c083.
---
 launcher/windows/src/ExtractUtils.c |  1 +
 launcher/windows/src/Main.c         | 31 ++++++++++++++++++-------------
 launcher/windows/src/SystemUtils.c  |  5 +++++
 launcher/windows/src/SystemUtils.h  |  1 +
 4 files changed, 25 insertions(+), 13 deletions(-)

diff --git a/launcher/windows/src/ExtractUtils.c b/launcher/windows/src/ExtractUtils.c
index 5eb8316..edbfa55 100644
--- a/launcher/windows/src/ExtractUtils.c
+++ b/launcher/windows/src/ExtractUtils.c
@@ -60,6 +60,7 @@ void skipStub(LauncherProperties * props) {
         WCHAR * os;
         props->status = EXIT_CODE_STUB;        
         os = appendStringW(NULL, L"It`s only the launcher stub.\nOS: ");
+        if(is9x()) os = appendStringW(os, L"Windows 9x");
         if(isNT()) os = appendStringW(os, L"Windows NT");
         if(is2k()) os = appendStringW(os, L"Windows 2000");
         if(isXP()) os = appendStringW(os, L"Windows XP");
diff --git a/launcher/windows/src/Main.c b/launcher/windows/src/Main.c
index e7b7b75..5a819ee 100644
--- a/launcher/windows/src/Main.c
+++ b/launcher/windows/src/Main.c
@@ -634,22 +634,27 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hi, LPSTR lpCmdLine, int nCmd
     globalInstance = hInstance;
     UNREFERENCED_PARAMETER(lpCmdLine);
     initWow64();
-    if(!createEvents()) {
-        status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
+    if(is9x()) {
+        MessageBoxA(0, "Windows 9X platform is not supported", "Message", MB_OK);
+        status = EXIT_CODE_SYSTEM_ERROR;
     } else {
-        LauncherProperties * props = createLauncherProperties();
-        createLauncherThread(props);
-        if(!createGui(props, hInstance, hi, nCmdShow)) {
-            status = EXIT_CODE_GUI_INITIALIZATION_ERROR;
+        if(!createEvents()) {
+            status = EXIT_CODE_EVENTS_INITIALIZATION_ERROR;
         } else {
-            messageLoop(props);
-            WaitForSingleObject(closingWindowsConfirmed, INFINITE);
+            LauncherProperties * props = createLauncherProperties();
+            createLauncherThread(props);
+            if(!createGui(props, hInstance, hi, nCmdShow)) {
+                status = EXIT_CODE_GUI_INITIALIZATION_ERROR;	        
+            } else {	        
+                messageLoop(props);
+                WaitForSingleObject(closingWindowsConfirmed, INFINITE);
+            }
+            
+            status = props->status;
+            exitCode = props->exitCode;
+            printStatus(props);
+            freeLauncherProperties(&props);
         }
-
-        status = props->status;
-        exitCode = props->exitCode;
-        printStatus(props);
-        freeLauncherProperties(&props);
     }
     FREE(currentProgressSize);
     FREE(totalProgressSize);
diff --git a/launcher/windows/src/SystemUtils.c b/launcher/windows/src/SystemUtils.c
index 983ea13..c8b423e 100644
--- a/launcher/windows/src/SystemUtils.c
+++ b/launcher/windows/src/SystemUtils.c
@@ -36,6 +36,11 @@ void getOSVersion(DWORD *id, DWORD *major, DWORD *minor, DWORD *productType) {
     return;
 }
 
+DWORD is9x() {
+    DWORD id, major, minor, type;
+    getOSVersion(& id, & major, & minor, & type);
+    return (id == VER_PLATFORM_WIN32_WINDOWS) ? 1 : 0;
+}
 DWORD isNT() {    
     DWORD id, major, minor, type;
     getOSVersion(& id, & major, & minor, & type);
diff --git a/launcher/windows/src/SystemUtils.h b/launcher/windows/src/SystemUtils.h
index bdbffc5..69437f8 100644
--- a/launcher/windows/src/SystemUtils.h
+++ b/launcher/windows/src/SystemUtils.h
@@ -24,6 +24,7 @@
 extern "C" {
 #endif
 
+DWORD is9x();
 DWORD isNT();
 DWORD isXP();
 DWORD is2k();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 09/19: Cleaner: Fixed spelling error in constant: MAX_ATTEPTS --> MAX_ATTEMPTS

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 5d455518b6466dc0fc6cfd60c442b3018482b5c9
Author: Lars Bruun-Hansen <lb...@apache.org>
AuthorDate: Sat Sep 14 10:48:24 2019 +0200

    Cleaner: Fixed spelling error in constant: MAX_ATTEPTS --> MAX_ATTEMPTS
---
 cleaner/windows/src/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cleaner/windows/src/main.c b/cleaner/windows/src/main.c
index a94a094..fb3d93c 100644
--- a/cleaner/windows/src/main.c
+++ b/cleaner/windows/src/main.c
@@ -23,7 +23,7 @@
 
 
 const DWORD SLEEP_DELAY   = 200;
-const DWORD MAX_ATTEPTS   = 15;
+const DWORD MAX_ATTEMPTS   = 15;
 const DWORD THREAD_FINISHED = 100;
 const DWORD INITIAL_DELAY = 2000; // 2 seconds is seems to be enough to finish java process
 const WCHAR * LINE_SEPARATOR = L"\r\n";
@@ -290,11 +290,11 @@ void deleteFile(WCHAR * filePath) {
     if(GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) {
         if(attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
             while((!RemoveDirectoryW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
-                ((count++) < MAX_ATTEPTS))
+                ((count++) < MAX_ATTEMPTS))
                 Sleep(SLEEP_DELAY);
         else
             while((!DeleteFileW(file) || GetFileAttributesExW(file, GetFileExInfoStandard, &attrs)) &&
-                ((count++) < MAX_ATTEPTS))
+                ((count++) < MAX_ATTEMPTS))
                 Sleep(SLEEP_DELAY);
     }
     LocalFree(file);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 10/19: Cleaner: Removed commented-out code and added explanatory comments.

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 215bdda1e9c46378e21dd2b11589b0e32847f03c
Author: Lars Bruun-Hansen <lb...@apache.org>
AuthorDate: Sat Sep 14 22:16:53 2019 +0200

    Cleaner: Removed commented-out code and added explanatory comments.
---
 cleaner/windows/src/main.c | 207 ++++++++++++++++++++++-----------------------
 1 file changed, 100 insertions(+), 107 deletions(-)

diff --git a/cleaner/windows/src/main.c b/cleaner/windows/src/main.c
index fb3d93c..74f0850 100644
--- a/cleaner/windows/src/main.c
+++ b/cleaner/windows/src/main.c
@@ -21,14 +21,82 @@
 #include <wchar.h>
 
 
+/*
+ * cleaner.exe
+ * 
+ * Deletes a list of files/folders.
+ * 
+ * The command line syntax is:
+ * 
+ *    arg1:   File name containing a list of files/folders to delete.
+ * 
+ * Requirements for arg1:
+ *  - The arg1 file name MUST be fully qualified. (or be in the same directory
+ *       as the cleaner.exe executable)
+ *  - The file MUST use Windows line ending (CRLF)
+ *  - The file MUST be encoded in UTF-16. The NBI Engine will produce
+ *    this file in Java charset "UNICODE" which effectively means
+ *    UCS-2 BigEndian BOM. Such file will work just fine.
+ *  - Each line in the file is expected to contain a fully qualified file
+ *    or folder name. The entry can be 
+ *        - a local file/folder name, e.g. "C:\foo\bar", up to a maximum of 32767 
+ *          chars and thus not subject to the original Windows limitation 
+ *          of 260 chars for a path name.
+ *        - a UNC, e.g. "\\servername\sharename\foo\bar", subject to a
+ *          restriction of 260 chars.
+ *  - The list MUST be ordered so that the files in a folder are listed before 
+ *    the folder itself. (it is not possible to delete a non-empty folder)
+ * 
+ * Method of working:
+ * 
+ * 1. After launch the content of command line arg1 is read into memory 
+ *    as one big string.
+ * 2. The string is chopped into a list by separating at the LINE_SEPARATOR.
+ * 3. Sleep for 2 seconds to allow the launching process (the JVM) to exit.
+ * 4. Loop over the list of files/folder to delete. Each file-delete operation 
+ *    is spawned into a thread of its own up to a maximum of 64 threads. 
+ *    Therefore the delete operations happens in parallel rather than in sequence. 
+ *    If 64 threads have been spawned then wait for a thread to exit before
+ *    spawning a new one. (therefore never more than 64 threads)
+ *    For each file delete operation do the following:
+ *       - Check to see if the file exists (by getting its attributes)
+ *       - If file: delete file, if directory: delete directory (these are two 
+ *            different calls in the Win32 API).
+ *       - Attempt to delete each file/dir up to 15 times sleeping for 200 ms 
+ *            between each attempt.
+ * 5. Wait for all file-delete threads to exit.
+ * 6. Delete self, i.e. the "cleaner.exe" executable.
+ * 7. End
+ *
+ * The arg1 file is not deleted. However it can be part of the list itself 
+ * if need be.
+ * 
+ * Author:  Dmitry Lipin, 2007
+ * 
+ *
+ *  
+ * Changes after transition to Apache:
+ * 
+ *   14-SEP-2019 Lars Bruun-Hansen (lbruun@apache.org) :   
+ *         Function comment headers added. 
+ *         Main comment header added.
+ *  
+ */
+
 
+// Retry functionality: 
+//   SLEEP_DELAY : millis between each attempt at a file delete
+//   MAX_ATTEMPTS : how many times to attempt to delete a file
 const DWORD SLEEP_DELAY   = 200;
 const DWORD MAX_ATTEMPTS   = 15;
 const DWORD THREAD_FINISHED = 100;
-const DWORD INITIAL_DELAY = 2000; // 2 seconds is seems to be enough to finish java process
+
+// Number of milliseconds to sleep at launch of the application.
+const DWORD INITIAL_DELAY = 2000; // 2 seconds seems to be enough to finish java process
+
 const WCHAR * LINE_SEPARATOR = L"\r\n";
-const WCHAR * UNC_PREFIX     = L"\\\\?\\";
-const WCHAR * UNC_STD_PREFIX = L"\\\\";
+const WCHAR * UNC_PREFIX     = L"\\\\?\\"; // Prefix for extended-length path in Win32 API
+const WCHAR * UNC_STD_PREFIX = L"\\\\";  // Prefix for UNC paths, for example: \\servername\share\foo\bar
 const DWORD UNC_PREFIX_LENGTH = 4;
 
 #ifdef _MSC_VER
@@ -37,25 +105,11 @@ const DWORD UNC_PREFIX_LENGTH = 4;
 #define ZERO(x,y) ZeroMemory((x),(y));
 #endif
 
+
 /*
- * typedef UINT  (WINAPI * WAIT_PROC)(HANDLE, DWORD);
- * typedef BOOL  (WINAPI * CLOSE_PROC)(HANDLE);
- * typedef BOOL  (WINAPI * DELETE_PROC)(LPCWSTR);
- * typedef VOID  (WINAPI * EXIT_PROC)(DWORD);
- * typedef VOID  (WINAPI * SLEEP_PROC)(DWORD);
- *
- *
- * typedef struct {
- * WAIT_PROC	waitObject;
- * CLOSE_PROC	closeHandle;
- * DELETE_PROC	deleteFile;
- * EXIT_PROC	exitProcess;
- * SLEEP_PROC  sleep;
- *
- * HANDLE		hProcess;
- * WCHAR		szFileName[MAX_PATH];
- *
- * } INJECT;
+ * Search for the first occurrence of wcs2 within wcs1.
+ * Returns a pointer to the first occurrence if found.
+ * If not found, NULL is returned.
  */
 WCHAR * search( const WCHAR * wcs1, const WCHAR * wcs2) {
     WCHAR *cp = (WCHAR *) wcs1;
@@ -80,91 +134,6 @@ WCHAR * search( const WCHAR * wcs1, const WCHAR * wcs2) {
     return(NULL);
 }
 
-/*
- * DWORD WINAPI RemoteThread(INJECT *remote) {
- * DWORD count = 0 ;
- *
- * remote->waitObject(remote->hProcess, INFINITE);
- * remote->closeHandle(remote->hProcess);
- * while(!remote->deleteFile(remote->szFileName) && (count++) < MAX_ATTEPTS) {
- * remote->sleep(SLEEP_DELAY);
- * }
- * remote->exitProcess(0);
- * return 0;
- * }
- *
- * HANDLE GetRemoteProcess() {
- * STARTUPINFO si;
- *
- * PROCESS_INFORMATION pi;
- * ZERO( &si, sizeof(si) );
- * ZERO( &pi, sizeof(pi) );
- * si.cb = sizeof(si);
- * if(CreateProcess(0, "explorer.exe", 0, 0, FALSE, CREATE_SUSPENDED|CREATE_NO_WINDOW|IDLE_PRIORITY_CLASS, 0, 0, &si, &pi)) {
- * CloseHandle(pi.hThread);
- * return pi.hProcess;
- * }
- * else {
- * return 0;
- * }
- * }
- *
- * BOOL removeItself() {
- *
- * INJECT local, *remote;
- * BYTE   *code;
- * HMODULE hKernel32;
- * HANDLE  hRemoteProcess;
- * HANDLE  hCurProc;
- *
- * DWORD	dwThreadId;
- * HANDLE	hThread = 0;
- * DWORD sizeOfCode = 200;
- *
- * hRemoteProcess = GetRemoteProcess();
- *
- * if(hRemoteProcess == 0) {
- * return FALSE;
- * }
- *
- * code = VirtualAllocEx(hRemoteProcess, 0, sizeof(INJECT) + sizeOfCode, MEM_RESERVE|MEM_COMMIT, PAGE_EXECUTE_READWRITE);
- *
- * if(code == 0) {
- * CloseHandle(hRemoteProcess);
- * return FALSE;
- * }
- *
- * hKernel32 = GetModuleHandleW(L"kernel32.dll");
- * remote = (INJECT *)(code + sizeOfCode);
- *
- * local.waitObject      = (WAIT_PROC)  GetProcAddress(hKernel32, "WaitForSingleObject");
- * local.closeHandle	  = (CLOSE_PROC) GetProcAddress(hKernel32, "CloseHandle");
- * local.exitProcess	  = (EXIT_PROC)  GetProcAddress(hKernel32, "ExitProcess");
- * local.deleteFile      = (DELETE_PROC)GetProcAddress(hKernel32, "DeleteFileW");
- * local.sleep           = (SLEEP_PROC) GetProcAddress(hKernel32, "Sleep");
- *
- * // duplicate our own process handle for remote process to wait on
- * hCurProc = GetCurrentProcess();
- *
- * DuplicateHandle(hCurProc, hCurProc, hRemoteProcess, &local.hProcess, 0, FALSE, DUPLICATE_SAME_ACCESS);
- *
- * // find name of current executable
- *
- * GetModuleFileNameW(NULL, local.szFileName, MAX_PATH);
- *
- * // write in code to execute, and the remote structure
- * WriteProcessMemory(hRemoteProcess, (LPVOID) code,   RemoteThread, sizeOfCode, 0);
- * WriteProcessMemory(hRemoteProcess, (LPVOID) remote, &local, sizeof(local), 0);
- *
- * // execute the code in remote process
- * hThread = CreateRemoteThread(hRemoteProcess, 0, 0, (LPTHREAD_START_ROUTINE) code, remote, 0, &dwThreadId);
- *
- * if(hThread != 0) {
- * CloseHandle(hThread);
- * }
- * return TRUE;
- * }
- */
 
 typedef struct _list {
     WCHAR * item;
@@ -203,6 +172,10 @@ WCHAR * toWCHAR(char * charBuffer, DWORD size) {
     return buffer;
 }
 
+/*
+ * Gets the number of lines in the input. 
+ * (lines are expected to be separated by LINE_SEPARATOR) 
+ */
 DWORD getLinesNumber(WCHAR *str) {
     DWORD result = 0;
     WCHAR *ptr = str;
@@ -222,6 +195,15 @@ DWORD getLinesNumber(WCHAR *str) {
     return result;
 }
 
+/*
+ * Produces a string array, 'list', from 'str' by splitting the string
+ * at each occurrence of LINE_SEPARATOR.
+ * 
+ * [IN] str:      the input
+ * [OUT] list:    string array
+ * [OUT] number:  number of elements in 'list' 
+ *
+ */
 void getLines(WCHAR *str, WCHAR *** list, DWORD * number) {
     WCHAR *ptr = str;
     WCHAR *ptr2 = NULL;
@@ -257,7 +239,9 @@ void getLines(WCHAR *str, WCHAR *** list, DWORD * number) {
     }
 }
 
-
+/*
+ *  Read file into memory. 
+ */
 void readStringList(HANDLE fileHandle, WCHAR *** list, DWORD *number) {
     DWORD size = GetFileSize(fileHandle, NULL); // hope it much less than 2GB
     DWORD read = 0;
@@ -329,6 +313,11 @@ void getFreeIndexForNextThread(HANDLE * list, DWORD max, DWORD * counter) {
     }
 }
 
+/*
+ * Deletes the the current executable. This is done by spawning a small
+ * .bat file which does the job. The .bat file even deletes itself when 
+ * finished.
+ */
 #define BUFSIZE 512
 void removeItselfUsingCmd() {
     char * currentFile = LocalAlloc(LPTR, sizeof(char) * BUFSIZE);    
@@ -391,6 +380,10 @@ void removeItselfUsingCmd() {
     
 }
 
+/*
+ * Changes directory to the directory where the currently executing
+ * executable is located.
+ */ 
 void changeCurrentDirectory() {
     WCHAR * currentFile = LocalAlloc(LPTR, sizeof(WCHAR) * MAX_PATH);    
     if (GetModuleFileNameW(0, currentFile, MAX_PATH)) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 18/19: Initial commit

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit 33fa4728be1b6d0197a8f95dfc18450c4c58993c
Merge: f77603a a204ab9
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Wed Nov 16 15:55:00 2022 +0100

    Initial commit

 src/main/cpp/build.properties                      |   68 +
 src/main/cpp/build.xml                             |  146 ++
 src/main/cpp/cleaner/unix/src/cleaner.sh           |   92 ++
 src/main/cpp/cleaner/windows/Makefile              |   79 +
 src/main/cpp/cleaner/windows/Makefile-vc           |   59 +
 .../cleaner/windows/nbproject/configurations.xml   |   97 ++
 .../cleaner/windows/nbproject/project.properties   |   20 +
 src/main/cpp/cleaner/windows/nbproject/project.xml |   31 +
 src/main/cpp/cleaner/windows/src/main.c            |  482 ++++++
 .../windows/vcproject/NBI Native Cleaner.ncb       |    1 +
 .../windows/vcproject/NBI Native Cleaner.sln       |   20 +
 .../windows/vcproject/NBI Native Cleaner.suo       |  Bin 0 -> 33280 bytes
 .../windows/vcproject/NBI Native Cleaner.vcproj    |  209 +++
 .../vcproject/NBI Native Cleaner.vcproj.user       |    1 +
 src/main/cpp/jnilib/.common/src/CommonUtils.c      |  384 +++++
 src/main/cpp/jnilib/.common/src/CommonUtils.h      |  122 ++
 .../cpp/jnilib/.unix/src/jni_UnixNativeUtils.c     |  108 ++
 .../cpp/jnilib/.unix/src/jni_UnixNativeUtils.h     |   83 +
 src/main/cpp/jnilib/linux/Makefile                 |  109 ++
 .../cpp/jnilib/linux/nbproject/configurations.xml  |  183 +++
 .../cpp/jnilib/linux/nbproject/project.properties  |   20 +
 src/main/cpp/jnilib/linux/nbproject/project.xml    |   31 +
 src/main/cpp/jnilib/macosx/Makefile                |  109 ++
 .../cpp/jnilib/macosx/nbproject/configurations.xml |  125 ++
 .../cpp/jnilib/macosx/nbproject/project.properties |   20 +
 src/main/cpp/jnilib/macosx/nbproject/project.xml   |   31 +
 src/main/cpp/jnilib/solaris-sparc/Makefile         |  109 ++
 .../solaris-sparc/nbproject/configurations.xml     |  283 ++++
 .../solaris-sparc/nbproject/project.properties     |   20 +
 .../cpp/jnilib/solaris-sparc/nbproject/project.xml |   31 +
 src/main/cpp/jnilib/solaris-x86/Makefile           |  109 ++
 .../solaris-x86/nbproject/configurations.xml       |  283 ++++
 .../solaris-x86/nbproject/project.properties       |   20 +
 .../cpp/jnilib/solaris-x86/nbproject/project.xml   |   31 +
 src/main/cpp/jnilib/windows/Makefile               |  109 ++
 src/main/cpp/jnilib/windows/Makefile-vc            |   76 +
 src/main/cpp/jnilib/windows/Makefile-vc-wo-crt     |   79 +
 .../jnilib/windows/nbproject/configurations.xml    |  179 +++
 .../jnilib/windows/nbproject/project.properties    |   20 +
 src/main/cpp/jnilib/windows/nbproject/project.xml  |   31 +
 src/main/cpp/jnilib/windows/src/WindowsUtils.c     |  146 ++
 src/main/cpp/jnilib/windows/src/WindowsUtils.h     |   48 +
 .../jnilib/windows/src/jni_WindowsNativeUtils.c    |  400 +++++
 .../jnilib/windows/src/jni_WindowsNativeUtils.h    |  109 ++
 .../cpp/jnilib/windows/src/jni_WindowsRegistry.c   |  632 ++++++++
 .../cpp/jnilib/windows/src/jni_WindowsRegistry.h   |  266 ++++
 .../jnilib/windows/vcproject/NBI JNI Library.ncb   |    1 +
 .../jnilib/windows/vcproject/NBI JNI Library.sln   |   20 +
 .../jnilib/windows/vcproject/NBI JNI Library.suo   |  Bin 0 -> 13824 bytes
 .../windows/vcproject/NBI JNI Library.vcproj       |  261 +++
 .../windows/vcproject/NBI JNI Library.vcproj.user  |    1 +
 src/main/cpp/jnilib/windows/vcproject/vc80.idb     |  Bin 0 -> 11264 bytes
 .../cpp/launcher/unix/i18n/launcher.properties     |   51 +
 src/main/cpp/launcher/unix/src/launcher.sh         | 1665 ++++++++++++++++++++
 src/main/cpp/launcher/windows/.dep.inc             |    5 +
 src/main/cpp/launcher/windows/Makefile             |  109 ++
 src/main/cpp/launcher/windows/Makefile-vc          |   92 ++
 src/main/cpp/launcher/windows/Makefile-vc-wo-crt   |   92 ++
 .../cpp/launcher/windows/i18n/launcher.properties  |   54 +
 .../launcher/windows/nbproject/configurations.xml  |  107 ++
 .../launcher/windows/nbproject/project.properties  |   20 +
 .../cpp/launcher/windows/nbproject/project.xml     |   46 +
 src/main/cpp/launcher/windows/resources/icon.ico   |  Bin 0 -> 99678 bytes
 .../windows/resources/nlw-alt.exe.manifest         |   31 +
 .../launcher/windows/resources/nlw.exe.manifest    |   31 +
 src/main/cpp/launcher/windows/resources/res.rc     |   39 +
 src/main/cpp/launcher/windows/src/Errors.h         |   52 +
 src/main/cpp/launcher/windows/src/ExtractUtils.c   |  761 +++++++++
 src/main/cpp/launcher/windows/src/ExtractUtils.h   |   50 +
 src/main/cpp/launcher/windows/src/FileUtils.c      |  593 +++++++
 src/main/cpp/launcher/windows/src/FileUtils.h      |   68 +
 src/main/cpp/launcher/windows/src/JavaUtils.c      |  796 ++++++++++
 src/main/cpp/launcher/windows/src/JavaUtils.h      |   64 +
 src/main/cpp/launcher/windows/src/Launcher.c       | 1009 ++++++++++++
 src/main/cpp/launcher/windows/src/Launcher.h       |   53 +
 src/main/cpp/launcher/windows/src/Main.c           |  672 ++++++++
 src/main/cpp/launcher/windows/src/Main.h           |   58 +
 src/main/cpp/launcher/windows/src/ProcessUtils.c   |  221 +++
 src/main/cpp/launcher/windows/src/ProcessUtils.h   |   48 +
 src/main/cpp/launcher/windows/src/RegistryUtils.c  |   60 +
 src/main/cpp/launcher/windows/src/RegistryUtils.h  |   44 +
 src/main/cpp/launcher/windows/src/StringUtils.c    |  794 ++++++++++
 src/main/cpp/launcher/windows/src/StringUtils.h    |  149 ++
 src/main/cpp/launcher/windows/src/SystemUtils.c    |  100 ++
 src/main/cpp/launcher/windows/src/SystemUtils.h    |   44 +
 src/main/cpp/launcher/windows/src/Types.h          |  155 ++
 .../windows/vcproject/NBI Native Launcher.ncb      |    1 +
 .../windows/vcproject/NBI Native Launcher.sln      |   17 +
 .../windows/vcproject/NBI Native Launcher.suo      |  Bin 0 -> 50176 bytes
 .../windows/vcproject/NBI Native Launcher.vcproj   |  304 ++++
 .../NBI Native Launcher.vcproj.SARD.dlm198383.user |   65 +
 .../vcproject/NBI Native Launcher.vcproj.user      |    1 +
 92 files changed, 14415 insertions(+)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 05/19: [NETBEANS-1157] resolved problem with java version higher 9 and the native windows launcher

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit c9f2e2d4ce06a4ee209849088af8a241b350ec7e
Author: Andreas Hauffe <an...@tu-dresden.de>
AuthorDate: Tue Aug 21 08:35:03 2018 +0200

    [NETBEANS-1157] resolved problem with java version higher 9 and the native windows launcher
---
 launcher/windows/src/JavaUtils.c | 107 +++++++++++++++++++++++----------------
 1 file changed, 64 insertions(+), 43 deletions(-)

diff --git a/launcher/windows/src/JavaUtils.c b/launcher/windows/src/JavaUtils.c
index 4fbf7f9..5e9fad4 100644
--- a/launcher/windows/src/JavaUtils.c
+++ b/launcher/windows/src/JavaUtils.c
@@ -125,58 +125,79 @@ DWORD isJavaCompatible(JavaProperties *currentJava, JavaCompatible ** compatible
 JavaVersion * getJavaVersionFromString(char * string, DWORD * result) {
     JavaVersion *vers = NULL;
     if(getLengthA(string)>=3) {
-        //hope that at least we "major.minor" : 1.5
-        if(string[1]=='.') {
-            char c = string[0];
+        char *p = string;
+        
+        // get major 
+        long major = 0;
+        while(p!=NULL) {
+            char c = p[0];
+            if(c>='0' && c<='9') {
+                major = (major) * 10 + c - '0';
+                p++;
+                continue;
+            }
+            else if(c=='.'){
+                p++;
+            }
+            else{
+                return vers;
+            }
+            break;
+        }
+        
+        // get minor 
+        long minor = 0;
+        while(p!=NULL) {
+            char c = p[0];
             if(c>='0' && c<='9') {
-                long major = c - '0';
-                c = string[2];
-                if(c>='0' && c<='9') {
-                    char *p = string + 3;
-                    long minor = c - '0';
-                    *result = ERROR_OK;
-                    vers = (JavaVersion*) LocalAlloc(LPTR, sizeof(JavaVersion));
-                    vers->major  = major;
-                    vers->minor  = minor;
-                    vers->micro  = 0;
-                    vers->update = 0;
-                    ZERO(vers->build, 128);
-                    if(p!=NULL) {
-                        if(p[0]=='.') { // micro...
+                minor = (minor) * 10 + c - '0';
+                p++;
+                continue;
+            }
+            break;
+        }
+        
+        *result = ERROR_OK;
+        vers = (JavaVersion*) LocalAlloc(LPTR, sizeof(JavaVersion));
+        vers->major  = major;
+        vers->minor  = minor;
+        vers->micro  = 0;
+        vers->update = 0;
+        ZERO(vers->build, 128);
+        
+        if(p!=NULL) {
+            if(p[0]=='.') { // micro...
+                p++;
+                while(p!=NULL) {
+                    char c = p[0];
+                    if(c>='0' && c<='9') {
+                        vers->micro = (vers->micro) * 10 + c - '0';
+                        p++;
+                        continue;
+                    }
+                    else if(c=='_') {//update
+                        p++;
+                        while(p!=NULL) {
+                            c = p[0];
                             p++;
-                            while(p!=NULL) {
-                                char c = p[0];
-                                if(c>='0' && c<='9') {
-                                    vers->micro = (vers->micro) * 10 + c - '0';
-                                    p++;
-                                    continue;
-                                }
-                                else if(c=='_') {//update
-                                    p++;
-                                    while(p!=NULL) {
-                                        c = p[0];
-                                        p++;
-                                        if(c>='0' && c<='9') {
-                                            vers->update = (vers->update) * 10 + c - '0';
-                                            continue;
-                                        } else {
-                                            break;
-                                        }
-                                    }
-                                } else {
-                                    if(p!=NULL) p++;
-                                }
-                                if(c=='-' && p!=NULL) { // build number
-                                    lstrcpyn(vers->build, p, min(127, getLengthA(p)+1));
-                                }
+                            if(c>='0' && c<='9') {
+                                vers->update = (vers->update) * 10 + c - '0';
+                                continue;
+                            } else {
                                 break;
                             }
                         }
+                    } else {
+                        if(p!=NULL) p++;
+                    }
+                    if(c=='-' && p!=NULL) { // build number
+                        lstrcpyn(vers->build, p, min(127, getLengthA(p)+1));
                     }
+                    break;
                 }
             }
         }
-    }
+    } 
     return vers;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[netbeans-native-installers] 06/19: clean up code and implementation of hints

Posted by sk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-native-installers.git

commit f338cc42f9f9f96e08bca2137c9b65c432fb5442
Author: Andreas Hauffe <an...@tu-dresden.de>
AuthorDate: Tue Aug 21 14:27:58 2018 +0200

    clean up code and implementation of hints
---
 launcher/windows/src/JavaUtils.c | 117 +++++++++++++++++++--------------------
 1 file changed, 56 insertions(+), 61 deletions(-)

diff --git a/launcher/windows/src/JavaUtils.c b/launcher/windows/src/JavaUtils.c
index 5e9fad4..6012afb 100644
--- a/launcher/windows/src/JavaUtils.c
+++ b/launcher/windows/src/JavaUtils.c
@@ -124,80 +124,75 @@ DWORD isJavaCompatible(JavaProperties *currentJava, JavaCompatible ** compatible
 
 JavaVersion * getJavaVersionFromString(char * string, DWORD * result) {
     JavaVersion *vers = NULL;
-    if(getLengthA(string)>=3) {
-        char *p = string;
-        
-        // get major 
-        long major = 0;
-        while(p!=NULL) {
-            char c = p[0];
-            if(c>='0' && c<='9') {
-                major = (major) * 10 + c - '0';
-                p++;
-                continue;
-            }
-            else if(c=='.'){
-                p++;
-            }
-            else{
-                return vers;
-            }
+    if(getLengthA(string)<3) {
+        return vers;
+    }
+
+    const char *p = string;
+
+    // get major 
+    long major = 0;
+    while(*p!=0) {
+        char c = *p++;
+        if(c>='0' && c<='9') {
+            major = (major) * 10 + c - '0';
+            if (major > 999) return vers;
+            continue;
+        } else if(c=='.'){
             break;
+        } else{
+            return vers;
         }
-        
-        // get minor 
-        long minor = 0;
-        while(p!=NULL) {
-            char c = p[0];
+    }
+
+    // get minor 
+    long minor = 0;
+    while(*p!=0) {
+        char c = *p;
+        if(c>='0' && c<='9') {
+            minor = (minor) * 10 + c - '0';
+            p++;
+            continue;
+        }
+        break;
+    }
+
+    *result = ERROR_OK;
+    vers = (JavaVersion*) LocalAlloc(LPTR, sizeof(JavaVersion));
+    vers->major  = major;
+    vers->minor  = minor;
+    vers->micro  = 0;
+    vers->update = 0;
+    ZERO(vers->build, 128);
+
+    if(p[0]=='.') { // micro...
+        p++;
+        while(*p!=0) {
+            char c = *p;
             if(c>='0' && c<='9') {
-                minor = (minor) * 10 + c - '0';
+                vers->micro = (vers->micro) * 10 + c - '0';
                 p++;
                 continue;
-            }
-            break;
-        }
-        
-        *result = ERROR_OK;
-        vers = (JavaVersion*) LocalAlloc(LPTR, sizeof(JavaVersion));
-        vers->major  = major;
-        vers->minor  = minor;
-        vers->micro  = 0;
-        vers->update = 0;
-        ZERO(vers->build, 128);
-        
-        if(p!=NULL) {
-            if(p[0]=='.') { // micro...
+            } else if(c=='_') {//update
                 p++;
-                while(p!=NULL) {
-                    char c = p[0];
+                while((c = *p) != 0) {
+                    p++;
                     if(c>='0' && c<='9') {
-                        vers->micro = (vers->micro) * 10 + c - '0';
-                        p++;
+                        vers->update = (vers->update) * 10 + c - '0';
                         continue;
-                    }
-                    else if(c=='_') {//update
-                        p++;
-                        while(p!=NULL) {
-                            c = p[0];
-                            p++;
-                            if(c>='0' && c<='9') {
-                                vers->update = (vers->update) * 10 + c - '0';
-                                continue;
-                            } else {
-                                break;
-                            }
-                        }
                     } else {
-                        if(p!=NULL) p++;
-                    }
-                    if(c=='-' && p!=NULL) { // build number
-                        lstrcpyn(vers->build, p, min(127, getLengthA(p)+1));
+                        break;
                     }
-                    break;
                 }
+            } else {
+                if(*p!=0) p++;
+            }
+            if(c=='-' && *p!=0) { // build number
+                lstrcpyn(vers->build, p, min(127, getLengthA(p)+1));
             }
+            break;
         }
-    } 
+    }
     return vers;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists