JComponentPack Programmer Guide > JComponentPack Deploy

JComponentPack Deploy

In the following samples, the "http://www.mywebsite.com" stands for the customer's web site, the "myapplication.jar" stands for the customer's main application jar archive, the "MyApplication" stands for the application's main class, the "MyApplet" stands for the application's applet. Change it when you need.

Application

Sets the classpath to including the "componentpack-all.jar", or pass the jar archive to JDK tools command line argument.
Win32:
javac -classpath componentpack-all.jar;myapplication.jar MyApplication.java
java -classpath componentpack-all.jar;myapplication.jar MyApplication
Unix:
javac -classpath componentpack-all.jar:myapplication.jar MyApplication.java
java -classpath componentpack-all.jar:myapplication.jar MyApplication

Java Web Start

Configure the Java Web Start jnlp file, put the <lib> which includes the "componentpack-all.jar" Jar archive into 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 JComponentPack demo application</description>
    <description kind="short">A JComponentPack demo application.</description>
    <icon href="icon/JComponentPackColor32.gif"/>
    <offline-allowed />
  </information>
  <security>
    <all-permissions />
  </security>
  <resources>
    <j2se version="1.5+" />
    <jar href="componentpack-all.jar" main="true" download="eager" />
    <jar href="myapplication.jar" main="true" download="eager" />    
  </resources>
  <application-desc main-class="MyApplication" />
</jnlp>

Applet

Configure the applet tag in the web page, the Applet tag should include the "componentpack-all.jar" in it's <archive> attribute.

Sample (Applet Tag):

<applet code="MyApplet.class " archive="componentpack-all.jar, myapplication.jar" width="800" height="600">
</applet>


Copyright (C) 2009 Extreme Component, Inc. All rights reserved.