开发者

Java Deployment

When deploying a Jav开发者_如何转开发a 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?


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.


    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.


    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.


    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.

  • 0

    上一篇:

    下一篇:

    精彩评论

    暂无评论...
    验证码 换一张
    取 消

    最新问答

    问答排行榜