2

When deploying a Java application, can I assume that every computer has java, and so is able to run my application? I've just created a java app, which works on my computer, but my boss (who generally uses .NET) claims it doesn't work at all. Should I assume that this will happen often, or will most consumers have java?

1
  • AFAIK 70% of computers have a JRE installed. Commented Feb 23, 2010 at 17:51

4 Answers 4

1

I think it is better to NOT assume that all computers have JRE installed. Just like development practice you need to have a deployment strategy for your application.

Here are some of the questions you need to find answers to arrive at a better deployment strategy:

  • Which version of JRE is needed, what if the computers on which the application is run has an older version of JRE ?
  • What all platforms (windows, linux or both ) your application is going to be run ?
  • Is there a IT policy that ensures that a standard version of JRE is available on all the hosts ? In this case you can make a valid assumption that all computers on which application is run has the JRE installed?
  • If you need a specific version of JRE which is not available on all the computers may be you have to bundle the JRE along with your application.

  • Sign up to request clarification or add additional context in comments.

    Comments

    1

    I think that you should provide to your users a way to download/install the jre (probably a link) with a friendly message explaining the need to install it. Java is widely use.

    NOTE In example, following is an example of the applet tag:

    <applet code=Applet1.class width="200" height="200">
    Your browser does not support the <code>applet</code> tag.
    </applet> 
    

    If you are deploying your application in a traditional way, there are some java application installers that handle it for you.

    I hope it helps you.

    3 Comments

    That's a good idea. I'm still new to Java - any ideas how to check for a JRE? Thanks
    That's what I do - a link to java.com/en/download/help/testvm.xml to test the JRE version for being most recent and allow you to install/upgrade.
    And for what it's worth, I have never had a need for a maximum or particular JVM, only ever one that is at least x. That is I have apps coded for Java 2, 3, 4, 5 and 6 and they all work just fine on later versions. Java has been incredibly good with backward compatibility since 1.2.
    0

    You can also deploy a jre along with your application. Many 3rd party applications do this to ensure that the proper version of Java is available on the system. There are pros and cons with each approach.

    You will want to refer to the license information about redistributing the jre contained in the jre folder ( e.g C:\Program Files (x86)\Java\jre6\README.txt - or wherever your install is ) to ensure you follow the proper procedures.

    Comments

    0

    There are a number of solutions. You should not assume that everyone has Java installed. You can use web start for instance which will help with the setup. You can find some advice here.

    More info about web start here.

    Comments

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.