当前位置: 首页 > 工具软件 > Celtix > 使用案例 >

java celtix,Celtix安装配置说明 Celtix Installation

阎功
2023-12-01

Downloading Celtix

You can download a Celtix distribution from the Celtix project page on the ObjectWeb site:http://forge.objectweb.org/projects/celtix.

Celtix is provided as an extractable JAR file. You can select either a source or binary distribution. Each distribution is also provided under two licensing agreements:

•Eclipse Public License (EPL)

•Lesser General Public License (LGPL)

There are two kinds of jar files available: Source and Binary

Download the version that best suits your needs. Users interested in running the product samples and/or writing Celtix applications should select the binary distribution. Users interested in reviewing the source code, and perhaps contributing to the Celtix project, might choose to use the source distribution.

Choose binary distribution for running Celtix, so download “celtix-1.0-bin-epl.jar" or “celtix-1.0-bin-lgpl.jar" at first.

Install Prerequisite

Before installing Celtix 1.0, you must ensure that you have the following product versions installed:

•JDK

1.5.0_06 (JDK 5.0 update 6) and above. Celtix requires this version of the JDK for compilation and execution.

•Apache Ant

1.6.5 and above. Ant is optionally used to compile and execute Celtix applications. It is also possible to compile and run Celtix applications using javac and java directly. For further information of Ant, visit web page shown as follow (

Installation Instruction

You can install Celtix on any operating system that supports the Java 5 platform.

Installing the Celtix Binary Distribution

To install either of the binary distributions (EPL or LGPL), perform the following steps:

1. Download the distribution file to a local directory.

2. Create an installation directory, (for example, Celtix-install).

3. Open a command window and move to the installation directory. Confirm that the%JAVA_HOME%/bin(Windows) or$JAVA_HOME/bin(UNIX) directory is on thePATH.

4. Use thejavaexecutable to extract the archive, for example:

java -jar path_to_Celtix_binary_distribution_file

5. The extraction process will create the following directory structure:

Setting the Environment for the Binary Distribution

Before you can compile and run thesampleapplications, you must set the environment so that the directories holding the Celtix, Java, and Ant utility applications are on thePATH.

Open a command window, and move to the samples subdirectory under your Celtix installation. Ensure that the following environment variables are set. If you will be using the Ant build system exclusively, theceltix.jarfile does not need to be included in theCLASSPATHvariable. You may find it convenient to write a script or batch file that sets these environment variables.

The environment variables to be set as follows:

JAVA_HOME

JDK installation directory (for example, C:/jdk1.5)

CELTIX_HOME

Celtix installation directory (for example, C:/Celtix-install/celtix)

CLASSPATH

Windows:

.;%CELTIX_HOME%/lib/celtix.jar;./build/classes

UNIX:

.:$CELTIX_HOME/lib/celtix.jar:./build/classes

ANT_HOME

Windows:

Ant-install-dir/apache-ant-

1.6.5

UNIX:

Ant-install-dir/apache-ant-

1.6.5

PATH

Windows:

%ANT_HOME%/bin;%CELTIX_HOME%/bin;%JAVA_HOME%/bin;%PATH%

UNIX:

$MAVEN_HOME/bin:$CELTIX_HOME/bin:$JAVA_HOME/bin;$PATH

Testing the Installation

To test the installation of Celtix, try running the basic Hello World sample application, or any of the other samples.

Running a Sample Application

To build and run the Hello World application, perform the following steps:

1.Open a command window, and ensure that your environment is set.

2.Change directory to%CELTIX_HOME%/samples/hello_world(Windows) or$CELTIX_HOME/samples/hello_world(UNIX).

3.Enter the ant build command to build both the client and server applications.

4.Open a new command window and set the environment.

5.Change directory to%CELTIX_HOME%/samples/hello_world(Windows) or$CELTIX_HOME/samples/hello_world(UNIX).

6.Enter theant server command.

7.In the first command window, enter theant clientcommand. Above is just a simple SOAP app.

 类似资料: