This discussion is archived
3 Replies Latest reply: Jun 16, 2009 8:17 PM by 796365 RSS

How to prevent upgrade to next major version

843804 Newbie
Currently Being Moderated
What is the standard practice to make sure a JDK or JRE doesn't upgrade beyond the current major version? I suspect the default behavior upgrades to the next major version?

Because of issues with SSL, I need to prevent some deployments from upgrading to JDK1.6.
  • 1. Re: How to prevent upgrade to next major version
    793415 Pro
    Currently Being Moderated
    >
    What is the standard practice to make sure a JDK or JRE doesn't upgrade beyond the current major version? >
    The standard practice is not to impose such arbitrary restrictions on the end-user ("sorry, you cannot use that newest app. because +our+ app. wants an earlier version").
    >
    ..I suspect the default behavior upgrades to the next major version?

    Because of issues with SSL, I need to prevent some deployments from upgrading to JDK1.6.>
    Launch you app. with webstart, and use webstart to point to the [earlier version|http://pscode.org/jws/version.html#earlier]. Note this this does not prevent the user from upgrading their Java, it just ensures that a suitable Java is available for the app. - so the user might end up with multiple versions of Java installed.
  • 2. Re: How to prevent upgrade to next major version
    843804 Newbie
    Currently Being Moderated
    Thats a nice suggestion but my Java application is a "server" console application that runs as a service on the Windows system (in the background without desktop interactivity).

    Therefore, launching it via a webserver , with Webstart, from a mapped JNLP web server mime type is completely out of the question. ( http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/setup.html#steps )

    So, what would you suggest now?
  • 3. Re: How to prevent upgrade to next major version
    796365 Newbie
    Currently Being Moderated
    Then don't use Web Start. Do use the other concepts that Andrew stated. Package a JRE with your application, of the desired version. When installing your application, copy* the packaged JRE to a directory that your application know about and can access. Then run your app using this private JRE. *If in Windows, don't install it, as that will register it with the Registry and interfere with the client's Java configuration.

    Let the client maintain and update their JRE - it won't affect your app's private JRE, and vice-versa.