12.3 Distribution Files12.3 Distribution Files
12 UML to RSL translator 12 UML to RSL translator
12.5 Using UML2RSL 12.5 Using UML2RSL
12.4 Installation

12.4 Installation

To install the UML2RSL tool you must follow the steps below:

12.4.1 Installing the DOM Parser

UML2RSL uses a commonly used API (Application Program Interface) for XML processors: the Document Object Model (DOM) API [11] [12] to parse its input. In DOM, when an XML document is parsed it is represented as a tree. DOM provides a set of APIs to access and manipulate the nodes in the DOM tree.

You need to install the XML Parser for Java 3.2.1 release or a later compatible version.

An XML parser for Java can be downloaded from http://www.alphaworks.ibm.com/tech/xml4j, as a .tar.gz file for Unix or Linux, or a .zip file for Windows.

12.4.2 Installing the Java Virtual Machine

You must use a Java 1.4 or later compatible Java Virtual Machine to run the UML2RSL application.

Java Virtual Machines developed by Sun (JDK standard) for Unix, Linux and Windows can be downloaded from:

http://java.sun.com/j2se/1.4/

For information on other platforms see: http://java.sun.com/cgi-bin/java-ports.cgi.

12.4.3 Installing the Java byte code files

Decide on an installation directory, and extract from the compressed file UML2RSL.tgz all the .class files to that directory.

Build it yourself

Alternatively, to build the Java byte code files from source, first just copy the Java source file UML2RSL.java (extracted from the .tgz file) to your installation directory.

In that directory then, for Windows, run the command

javac -classpath <xdir>\xml-apis.jar;<xdir>\xercesImpl.jar UML2RSL.java

or, for Unix or Linux, run the command

javac -classpath <xdir>/xml-apis.jar:<xdir>/xercesImpl.jar UML2RSL.java

where <xdir> is your installation directory.

In some implementations xml-apis.jar and xercesImpl.jar are replaced by a single file xerces.jar, and the above commands should be adapted accordingly.

If javac is not on your PATH, replace javac with its absolute name, which might in Windows be something like C:\j2sdk1.4.1_03\bin\javac

12.4.4 Creating the UML2RSL launcher

Follow the instructions below based on the operating system you are using.

Windows

Create the file UML2RSL.bat in your installation directory saving the following command for the Java interpreter in it:
java -classpath <idir>;<xdir>\xml-apis.jar;<xdir>\xercesImpl.jar UML2RSL %1 <rdir>

where

For example, if the XML parser was stored in c:\xml4j, your installation directory is c:\UML2RSL, and you want to store your RSL files in a sub-directory RSL, then UML2RSL.bat would contain

java -classpath c:\UML2RSL;c:\xml4j\xml-apis.jar;c:\xml4j\xercesImpl.jar UML2RSL %1 RSL

Make sure that your PATH variable includes the directory where the Java interpreter java.exe is installed. If you are not sure how to do this, you can replace java with its absolute name, which might be something like c:\j2sdk1.4.1_03\bin\java

You also need to put UML2RSL somewhere on your path. If you don't or can't do this you can still use it by using its absolute name: see section 12.5 below on using UML2RSL.

Unix and Linux

Create the file UML2RSL in your installation directory with the following contents:

#!/bin/sh

java -classpath <idir>:<xdir>/xml-apis.jar:<xdir>/xercesImpl.jar UML2RSL $1 <rdir>

where

Make UML2RSL executable, using for example the command

chmod u+x UML2RSL

Move it to somewhere on your path. If you don't or can't do this you can still use it by using its absolute name: see section 12.5 below on using UML2RSL.


Chris George, April 17, 2008

12.4 Installation
12.3 Distribution Files12.3 Distribution Files
12 UML to RSL translator 12 UML to RSL translator
12.5 Using UML2RSL 12.5 Using UML2RSL