Extreme Component

ComponentSet Programmer Guide > ComponentSet Deploy

ComponentSet Deploy

The following samples use the "http://www.mywebsite.com" for the customer web site, use the "myapplication.jar" for the customer main application jar archive, use the "MyApplication" for the application main class, use the "MyApplet" for the application applet. Change it for your configuration.

Application

Sets the classpath to includes the "componentset.jar", or pass the jar archive to JDK tools command line argument.
Win32:
javac -classpath lib/componentset.jar;lib/myapplication.jar MyApplication.java
java -classpath lib/componentset.jar;lib/myapplication.jar MyApplication
Unix:
javac -classpath lib/componentset.jar:lib/myapplication.jar MyApplication.java
java -classpath lib/componentset.jar:lib/myapplication.jar MyApplication

Java Web Start

Configure the Java Web Start jnlp file, use the <lib> to includes the "componentset.jar" jar archive in the <resource> tag.

Sample:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0" codebase="http://www.mywebsite.com" href="myapplication.jnlp">
  <information>
    <title>My Application</title>
    <vendor>My Company</vendor>
    <homepage href="http://www.mywebsite.com" />
    <description>A ComponentSet demo application</description>
    <description kind="short">A ComponentSet demo application.</description>
    <icon href="icon/ComponentSetColor32.gif"/>
    <offline-allowed />
  </information>
  <security>
    <all-permissions />
  </security>
  <resources>
    <j2se version="1.4+ 1.3+" />
    <jar href="lib/componentset.jar" main="true" download="eager" />
    <jar href="lib/myapplication.jar" main="true" download="eager" />    
  </resources>
  <application-desc main-class="MyApplication" />
</jnlp>

Applet

Configure the applet tag in the web page, includes the "componentset.jar" in the <archive> tag.

Sample (Applet Tag):

<applet code="MyApplet.class " archive="lib/componentset.jar, lib/myapplication.jar" width="800" height="600">
</applet>


Copyright (c) zfqjava.com
All rights reserved.