|
|
| ||||||
12.4 Installation |
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.
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:
For information on other platforms see: http://java.sun.com/cgi-bin/java-ports.cgi.
Decide on an installation directory, and extract from the compressed file UML2RSL.tgz all the .class files to that directory.
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
Follow the instructions below based on the operating system you are using.
java -classpath <idir>;<xdir>\xml-apis.jar;<xdir>\xercesImpl.jar UML2RSL %1 <rdir>
where
<idir>
is your installation directory
<xdir>
is the directory where xml-apis.jar
and
xercesImpl.jar
, parts of the XML parser for Java, are
located. (In some implementations these two are replaced by a
single file xerces.jar
.)
<rdir>
is the relative path (from where the xml input file is
stored) to a directory where you want the
RSL files produced by the tool UML2RSL to be saved.
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.
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
<idir>
is your installation directory
<xdir>
is the directory where xml-apis.jar
and
xercesImpl.jar
, parts of the XML parser for Java, are
located. (In some implementations these two are replaced by a
single file xerces.jar
.)
<rdir>
is the relative path (from where the xml input file is
stored) to a directory where you want the
RSL files produced by the tool UML2RSL to be saved.
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.
12.4 Installation | ||||||||
|
|
|