Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-6228

NBI: Support JVM bundling with other than Info-Zip

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • None
    • None
    • platform - installer
    • None

    Description

      (This ticket is carried over from BugZilla #239238.)

      The NBI has a feature whereby a JRE can be bundled as a self-executable compressed archive. This means the Installer can be launched without any JRE present on the target machine: the JRE is simply bundled inside the Installer executable.

      In order to execute the archive (uncompress it), NBI will add a -d option to the command line. Unfortunately this option is very specific to Info-ZIP's version of self-executables. This excludes use of other archive methods, for example 7Zip, which does not recognize a -d option.

      For one reason or another 7Zip compresses a JRE far better than Info-ZIP. It is also better documented. In contrast the Info-ZIP project seems rather abandoned and it is not trivial to get hold of the 'unzipsfx' stub needed to create the self-executable.

      What to do about it: The -d option to Info-Zip's unzipsfx specifies a target directory to unzip into. Instead of using this option the same effect can be achieved by first changing the working directory into the target directory (creating it if it doesn't exist) and then executing the self-executable archive which will then uncompress into the current directory. Hence the suggestion is to avoid any command line arguments on the self-executable archive.

      This way the user of the NetBeans Platform is free to use his/her own choice of archiving mechanism as long the archiving mechanism can produce a self-executable archive.
       
      The problem only exists on Windows. On other platforms the Installer Launcher does not add the -d option. The problem is in JavaUtils.c file, line 626-627. These lines are unnecessary as in line 629 the command is anyway executed with jvmDir as the working directory. Therefore a fix is trivial and will have no side-effects.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            lbruun Lars Bruun-Hansen

            Dates

              Created:
              Updated:

              Slack

                Issue deployment