Directory Studio
  1. Directory Studio
  2. DIRSTUDIO-345

Studio startup could configure suitable version of Java

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: studio-rcp
    • Labels:
      None

      Description

      I have several versions of Java installed; it so happens that the default is Java 1.4.2.

      This does not seem to be a problem for Directory Server, which found the Java 1.6 JRE and updated the .ini file accordingly, but Studio does not do this.

      The Studio installation program could be enhanced to create the appropriate entry in the ini file.

      Failing that, I suggest that a sample ini file be included in the installation with examples of possible entries.
      Might be a good idea to include one anyway.

        Activity

        Hide
        Pierre-Arnaud Marcelot added a comment -

        That's a good idea Sebb.

        Show
        Pierre-Arnaud Marcelot added a comment - That's a good idea Sebb.
        Hide
        Sebb added a comment -

        @Pierre:

        Sounds good, except that I think an ini file should always be created.

        It should contain comments showing how to change various aspects of startup, e.g. memory etc.
        Perhaps with a link to documentation of the options.

        @Jeff: so long as the bundled JRE is an option. I really don't want multiple copies of JREs installed on my system.

        Show
        Sebb added a comment - @Pierre: Sounds good, except that I think an ini file should always be created. It should contain comments showing how to change various aspects of startup, e.g. memory etc. Perhaps with a link to documentation of the options. @Jeff: so long as the bundled JRE is an option. I really don't want multiple copies of JREs installed on my system.
        Hide
        Pierre-Arnaud Marcelot added a comment -

        I've looked at what can be done within the NSIS framework we use to build the Windows installer.

        We are able to detect the default JRE, but not all the available JREs.

        What I propose is having a check for a default JRE installed on the system.
        If there's one, we check the version.
        If the version is greater or equal to 1.5.0,
        then it's ok, the installer goes on,
        else we display a page where the user is informed that a 1.5.0+ JRE is needed and where he can point us to a correct JRE home directory and in this case an "Apache Directory Studio.ini" file is created and contains the path to this JRE.
        In the case where we can't find any Default JRE installed we display a page where the user is informed that a 1.5.0+ JRE needs to be installed to run Apache Directory Studio.

        WDYT ?

        Show
        Pierre-Arnaud Marcelot added a comment - I've looked at what can be done within the NSIS framework we use to build the Windows installer. We are able to detect the default JRE, but not all the available JREs. What I propose is having a check for a default JRE installed on the system. If there's one, we check the version. If the version is greater or equal to 1.5.0, then it's ok, the installer goes on, else we display a page where the user is informed that a 1.5.0+ JRE is needed and where he can point us to a correct JRE home directory and in this case an "Apache Directory Studio.ini" file is created and contains the path to this JRE. In the case where we can't find any Default JRE installed we display a page where the user is informed that a 1.5.0+ JRE needs to be installed to run Apache Directory Studio. WDYT ?
        Hide
        Jeff MAURY added a comment -

        Inclusion does not mean installation so that it won't interfere with previous user installation.
        The pros of having a separate JRE bundled with Studio are warranty to work including the case where the user choose an external JRE then uninstall it and Studio does not work anymore. This is a very bad common case for Java applications. I don"t think the user should take care of the JRE when installing a Java application
        The cons are increased bundle size.

        Show
        Jeff MAURY added a comment - Inclusion does not mean installation so that it won't interfere with previous user installation. The pros of having a separate JRE bundled with Studio are warranty to work including the case where the user choose an external JRE then uninstall it and Studio does not work anymore. This is a very bad common case for Java applications. I don"t think the user should take care of the JRE when installing a Java application The cons are increased bundle size.
        Hide
        Sebb added a comment -

        Including a JRE is all very well, but if that is installed, it should not be installed as the default, as that may mess with the users settings.

        In which case, unless Studio is also updated to pick that JRE, the original problem still stands.

        ==

        If you want to provide an additional installation package that includes a JRE, fine.

        But I don't think users should be forced to download a JRE if they already have a suitable one installed.

        Show
        Sebb added a comment - Including a JRE is all very well, but if that is installed, it should not be installed as the default, as that may mess with the users settings. In which case, unless Studio is also updated to pick that JRE, the original problem still stands. == If you want to provide an additional installation package that includes a JRE, fine. But I don't think users should be forced to download a JRE if they already have a suitable one installed.
        Hide
        Jeff MAURY added a comment -

        Regarding 1), redistribution of the JRE is allowed (not for JDK), see http://java.sun.com/j2se/1.5.0/jre/README, so what are the licensing problems ?

        Show
        Jeff MAURY added a comment - Regarding 1), redistribution of the JRE is allowed (not for JDK), see http://java.sun.com/j2se/1.5.0/jre/README , so what are the licensing problems ?
        Hide
        Emmanuel Lecharny added a comment -

        Forget to add that we can ask the user for the path to a correct JVM in a dialog box.

        Show
        Emmanuel Lecharny added a comment - Forget to add that we can ask the user for the path to a correct JVM in a dialog box.
        Hide
        Emmanuel Lecharny added a comment -

        Sadly, we can't bundle a JRE (well, yes we can bundle Harmony due to licensing problems so option 1 can't be considered.

        Regarding option 2, the idea is that when launching the installer, we detect the local JVMs, and if we find at least one which is > 1.4, we propose the list to the user. If we don't find a correct JVM, we have to inform the user that he can either abort the installer, install a more recent JVM, or let him finish the installation and inform him that the product won't run because of the lack of decent JVM.

        Thanks Jeff !

        Show
        Emmanuel Lecharny added a comment - Sadly, we can't bundle a JRE (well, yes we can bundle Harmony due to licensing problems so option 1 can't be considered. Regarding option 2, the idea is that when launching the installer, we detect the local JVMs, and if we find at least one which is > 1.4, we propose the list to the user. If we don't find a correct JVM, we have to inform the user that he can either abort the installer, install a more recent JVM, or let him finish the installation and inform him that the product won't run because of the lack of decent JVM. Thanks Jeff !
        Hide
        Jeff MAURY added a comment -

        There are other ways to fix this problem:

        1) install a JRE with the Studio. Depending on the installer technology (I don't know which is the currently one used), this is feasible, a little more complex because we need to ship JRE for every platform, but this is guaranteed to work

        2) Instead of rejecting the installation, I would prefer a warning message asking the user to install the proper JDK and adding a dependency on the correct version of the JDK in one the studio plugin (product) so that starting Studio with the incorrect JDK will be refused correctly

        Show
        Jeff MAURY added a comment - There are other ways to fix this problem: 1) install a JRE with the Studio. Depending on the installer technology (I don't know which is the currently one used), this is feasible, a little more complex because we need to ship JRE for every platform, but this is guaranteed to work 2) Instead of rejecting the installation, I would prefer a warning message asking the user to install the proper JDK and adding a dependency on the correct version of the JDK in one the studio plugin (product) so that starting Studio with the incorrect JDK will be refused correctly
        Hide
        Emmanuel Lecharny added a comment -

        The installer should propose the existing JVM, and only the JVM > 1.4. If there are none, then the installer should fail.

        Configuring the script is a workaround, IMHO.

        Show
        Emmanuel Lecharny added a comment - The installer should propose the existing JVM, and only the JVM > 1.4. If there are none, then the installer should fail. Configuring the script is a workaround, IMHO.

          People

          • Assignee:
            Pierre-Arnaud Marcelot
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development