Java Web Start (JWS) を使用して J2EE アプリケーション・クライアントのアプリケーションおよび/またはシン・アプリケーション・クライアントのアプリケーションを起動するには、 IBM 提供の Java ランタイム環境、WebSphere Application Server のアプリケーション・クライアントにバンドルされる ライブラリー JAR ファイルおよびプロパティー・ファイルが JWS にインストールされている必要があります。 この項目では、アプリケーション・クライアント・インストールからアプリケーション・クライアント・ランタイム依存コンポーネントを作成するステップを記載します。 アプリケーション・サーバーにインストール可能な Web アーカイブ・リソー ス (WAR) ファイルとしてパッケージされています。
<!-- This sample program applies to WebSphere Application Server, Version 6.1. It is provided AS IS and may be used, executed, copied and modified without royalty payment by customer (a) for its own instruction and study, (b) in order to develop applications designed to run with an IBM WebSphere product, either for customer's own internal use or for redistribution by customer, as part of such an application, in customer's own products. Product 5630-A36, (C) COPYRIGHT International Business Machines Corp., 2005 All Rights Reserved * Licensed Materials - Property of IBM --> <%-- // to set the Last_Modified header so that the JNLP client will know whether to download // the JNLP file again and update the cached copy. String jspPath = application.getRealPath(request.getServletPath()); java.io.File jspFile = new java.io.File(jspPath); long lastModified = jspFile.lastModified(); %><% // locally declared variables String url=request.getRequestURL().toString(); String jnlpCodeBase=url.substring(0,url.lastIndexOf('/')); String jnlpRefURL=url.substring(url.lastIndexOf('/')+1,url.length()); // Need to set a JNLP mime type - if WebStart is installed on the client, // this header will induce the browser to drive the WebStart Client response.setContentType("application/x-java-jnlp-file"); 1 response.setHeader("Cache-Control", null); response.setHeader("Set-Cookie", null); response.setHeader("Vary", null); response.setDateHeader("Last-Modified", lastModified); // An installer must reply with the version number for a given install if (response.containsHeader("x-java-jnlp-version-id")) response.setHeader("x-java-jnlp-version-id", "WASClient6.1.0"); 2 else response.addHeader("x-java-jnlp-version-id", "WASClient6.1.0"); %> <?xml version="1.0" encoding="utf-8"?> <!-- ============================================================== --> <!-- TODO: change "codebase" to the actual url location of this jsp --> <!-- ============================================================== --> <jnlp spec="1.0+" codebase="http://YOUR_APP_SERVER:PORTNUMBER/WEBAPP_CONTEXT_ROOT/Runtime/WebSphereJre"> <information> <title>Application Client Java Runtime Environment</title> <vendor>IBM</vendor> <icon href="icon.gif"/> <description>Application Client Java Runtime Environment</description> <description kind="short">Application Client JRE</description> <description kind="tooltip">Application Client JRE</description> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.4+"/><%-- The installer can use any 1.4 JRE --%> 3 <jar href="WebSphereClientRuntimeInstaller.jar" main="true"/> 4 <!-- JRE version registration with Web Start --> <property name="com.ibm.websphere.client.jre.version" value="WASClient6.1.0"/> 5 </resources> <resources os="Windows"> 6 <!-- ============================================================== --> <!-- TODO: the property value for unix platform is "java/jre/bin/javaw" --> <!-- and the "os" value match to your target client machine platform --> <!-- ============================================================== --> <jar href="WASClient6.1.0_Windows.jar"/> 7 <!-- ============================================================== --> <!-- TODO: property value for unix platform is "java/jre/bin/javaw" --> <!-- ============================================================== --> <!-- relative path of the jre executable —-> <property name="com.ibm.websphere.client.jre.launch.java" value="java¥jre¥bin¥javaw.exe"/> 8 </resources> <installer-desc main-class="com.ibm.websphere.client.installer.ClientRuntimeInstaller"/> </jnlp>