Extreme Component

JDataGrid Programmer Guide > JDataGrid Deploy

JDataGrid 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

Set the classpath and make it including the "datagrid.jar", or pass the Jar archive to the JDK tool's argument.
Win32:
javac -classpath lib/datagrid.jar;lib/myapplication.jar MyApplication.java
java -classpath lib/datagrid.jar;lib/myapplication.jar MyApplication
Unix:
javac -classpath lib/datagrid.jar:lib/myapplication.jar MyApplication.java
java -classpath lib/datagrid.jar:lib/myapplication.jar MyApplication

Java Web Start

Configure the Java Web Start jnlp file, put the <jar> which includes the "datagrid.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 JDataGrid demo application</description>
    <description kind="short">A JDataGrid demo application.</description>
    <icon href="icon/JDataGridColor32.gif"/>
    <offline-allowed />
  </information>
  <security>
    <all-permissions />
  </security>
  <resources>
    <j2se version="1.4+ 1.3+" />
    <jar href="lib/datagrid.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, the Applet tag should include the "datagrid.jar" in it's <archive> attribute.

Sample (Applet Tag):

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


Copyright (c) zfqjava.com
All rights reserved.