NexJ Logo

Configuring the NexJ Studio installer

The NexJ Studio installer repository consists of a number of files that, when properly configured and placed on a website or file server, provide an installer and update site for NexJ Studio.

This section provides instructions on how to configure and deploy this installer to allow users to install NexJ Studio through a website. The users can update NexJ Studio through the Help → Check for Updates functionality.

Delivering the NexJ Studio installer on a file server or a local drive

The examples in this chapter all assume that you are delivering the installer over a web server.

However, you can adapt these instructions for use over a network, or even for use on a local drive. For example, you might use the following path declarations:

To deliver over a web server
http://example.com/installer

To deliver on a file server
file://server-name/installer

To deliver from a named drive
file:///d:/installer

Note

If you want to create an installation DVD, you can configure the installer to work from a named drive. However, if you do this, then all users of the DVD must ensure that it appears on their system using the drive name that you used to configure the installer. That is, if you configured the installer with a path such as file:///d:/installer, then all users must be sure that the disk appears as the D: drive on their system.


Setting update site information in the installer

Configure the default update site information in your NexJ Studio installer repository for each installation of NexJ Studio.

Ensure that you have been provided the p2site repository folder, containing the build_script, p2_customize folders. Your installer is configured by reading the content.jar file in your p2site repository folder. To customize your installer, you need to recreate the content.jar file with your customized definitions. This is done by first editing the build_script/build.xml file and the p2_customize/content.xml file and then running the build.xml file as an Ant script.

Since completing this task recreates the content.jar file that is delivered in the p2site repository folder, make a backup of this file before proceeding.

To customize your installation to your specific needs:

  1. Open the p2_customize/content.xml file in a text editor.
    1. Update the location URL in the org.eclipse.equinox.p2.touchpoint.eclipse.addRepository entry to point to your update site location.
      The original value is http${#58}//localhost. Update both instances of the property. This specifies the location that NexJ Studio refers to in order to properly install new versions of NexJ Studio.
    2. Update the location URL in the org.eclipse.equinox.p2.touchpoint.eclipse.removeRepository entry to point to your update site location.
      The original value is http${#58}//localhost. Update both instances of the property. This specifies the location that NexJ Studio refers to in order to properly uninstall older versions of NexJ Studio during the upgrade process.

      Note

      Any colons in the value that you specify must be replaced by ${#58}. For example, you should express the URL http://example.com/installer as http${#58}//example.com/installer.

  2. In the build_script folder, edit the build.xml file.

    1. Set the target_p2_repo entry to the filesystem path of the p2site repository folder. Ensure that you can write to the folder.

    2. Set the source_p2_repo entry to the filesystem path to p2_customize folder. These steps ensure that your update site location defined in your content.xml file links to your p2site repository folder.

  3. In the NexJ Studio Package Explorer, right-click the build.xml file and select Run As → 2 Ant Build....
    The Edit Configuration dialog displays.

  4. In the JRE tab, ensure that the Run in the same JRE as workspace option is selected.

  5. Click Run.

The Ant script reads the information contained in the content.xml file and uses it to recreate the content.jar file contained in the p2site repository folder. When this new JAR file is used for installation, it will automatically configure the update site information in the newly installed instance of NexJ Studio.

Configuring the NexJ Studio web install

The installation and update site files for NexJ Studio are contained in the p2site repository folder.

The files are initially configured for an update site being hosted at http://localhost. If you want to run your install and update site from a different server, or from a folder on that server, you must reconfigure the files.

These steps all refer to the files stored in the p2site repository directory and must be carried out before you deploy the files to your web server.

To configure the web installer file before deployment:

  1. Update the installer.properties file:
    1. Set eclipse.p2.metadata to the update site URL. This is the site that will be housing the NexJ Studio files that you want to install. The initial value for this property is http://localhost.
    2. Set eclipse.p2.artifacts to the same update site URL.
    3. Set eclipse.p2.defaultInstallLocation to the location that you want to install NexJ Studio by default on your users' computers.

      Info

      Because of the way that Microsoft Windows handles the security of program file directories, we recommend setting this value to install NexJ Studio into its own folder, outside of both the Program Files and Program Files (x86) directories.

  2. In the following files, update the codebase attribute of the root jnlp node to the URL of the update site that you are creating:

    • features/org.eclipse.equinox.p2.installer.feature_4.5.jnlp
    • features/org.eclipse.equinox.p2.installer.feature_4.5_old
    • features/org.eclipse.equinox.p2.installer.feature_4.5A
    • features/org.eclipse.equinox.p2.installer.feature_4.5B
    • features/org.eclipse.equinox.p2.installer.custom_4.5.jnlp
    • studio_install.jnlp
      For example, if you are creating an update site at http://example.com/installer, then you should update the root node to:
      <jnlp spec="1.0+" codebase="http://example.com/installer">
  3. In the studio_install.jnlp file, set the value of the com.nexjsystems.installer.installDescription property to the fully qualified URL of the installer.properties file. For example:
    <property name="com.nexjsystems.installer.installDescription" 
    value="http://example.com/installer/installer.properties"/>

You can now deploy the contents of the p2site repository folder to your web server.

Info

Ensure that the following MIME types have been defined for your web server, to enable it to correctly identify and handle files required by the installer.


File extensionHandler type
.propertytext/plain
.jnlpapplication/x-java-jnlp-file
Numerical extensions from .000 to .999application/java-archive


For more information about Microsoft Internet Information Services (IIS) and MIME types, see the "Configuring MIME Types in IIS 7" topic on the Microsoft web site at http://technet.microsoft.com/en-us/library/cc753281%28v=ws.10%29.aspx.

For more information about Apache HTTP Server and MIME types, see the mod_mime module description on the Apache web site at http://httpd.apache.org/docs/current/mod/mod_mime.html .

To install the product, you should provide users with a hyperlink to the studio_install.jnlp file, for example, http://example.com/installer/studio_install.jnlp.

Changing the installer name

If you want to change the name of the studio_install.jnlp file, you must modify its contents as well as its file name.

To modify the file name of studio_install.jnlp:

  1. Rename the studio_install.jnlp file.
  2. Open the renamed file in a text editor.
  3. In the root jnlp element, update the href attribute to the new name. For example, if you changed the file name from studio_install.jnlp to studio_custom_install.jnlp, then you should update the href attribute to read:

    <jnlp spec="1.0+" codebase="http://example.com/installer" href="studio_custom_install.jnlp"

4. Save your changes.

Your installer name has been successfully changed.