Overview
This document explains how to configure your Java environment to run ArchStudio 3, and then continues on to explain how to configure a Java development environment to develop extensions to ArchStudio 3. Readers of this document should first familiarize themselves with the information in Setting up Java for ArchStudio 3, which is critical background information for understanding this document.
Getting the Files
This section is duplicated on the Setting up Java for ArchStudio 3 page.
ArchStudio 3 is a Java application written specifically for Java 2 version 1.4 (aka JDK1.4) or better. It will not run properly in any previous version of Java, including 1.3.1. As of this writing, the latest version of the Java 2 Software Development Kit is J2SDK1.4.2. ArchStudio 3 has been tested with this version, and the beta status of the J2SDK does not seem to present any significant problems.
In order to run ArchStudio 3 or do any development on it, you will need to download and install Java 2 SDK version 1.4. This is a free download from Sun Microsystems, and is available for Solaris, Windows, and Linux. Other platforms (such as Macintosh) have separately developed SDKs.
Note that there is a separate download available called the Java 2 Runtime Environment (JRE) that does not include developer tools. The J2SDK includes everything that this runtime environment does, and therefore we recommend just downloading the J2SDK.
Note that it is possible to have any number of JDK's happily installed on your machine at any given time. Make sure to install them in separate directories, and in order of release, if possible. One of our developer machines has JDK1.0.2, 1.1, 1.2.2, 1.3.1, and 1.4.0beta3 all running together. Note special considerations on paths and classpaths, below.
Once you've got J2SDK1.4 installed, you can go to the dowload page. This will direct you to the ISR Software Update Site where you can download our latest tools, including ArchStudio 3. Make sure to download and install both ArchStudio 3 and the xArch/xADL 2.0 Data Binding Library.
Running ArchStudio 3
Once you've got the files listed above installed on your machine, you can run ArchStudio 3.
When you install ArchStudio 3, it will create a directory structure in the target directory like this:
+-(ArchStudio install directory) | +--+-archstudio | +--+-bin | +-doc | +-lib | +-src
Likewise, the installation of the xArch/xADL 2.0 Data Binding Library will create a directory structure in the target directory like this:
+-(data binding library install directory) | +--+-xarchlibs | +--+-doc | +-lib | +-src
In the lib
directories, you will find two JAR files, named
xarchlibs.jar
and archstudio.jar
. Both of these
must be on your CLASSPATH
when you run ArchStudio 3. You can either
add them manually, in a shellscript or batch file, or on the Java command line.
Please see Setting up Java for ArchStudio 3
for detailed information on the Java CLASSPATH
.
An example CLASSPATH
might be (on Windows):
CLASSPATH=C:\ISRTools\archstudio\lib\archstudio.jar;
C:\ISRTools\xarchlibs\lib\xarchlibs.jar
or, on UNIX:
CLASSPATH=/usr/isrtools/archstudio/lib/archstudio.jar:
/usr/isrtools/xarchlibs/lib/xarchlibs.jar
The command to run ArchStudio 3 is as follows:
java archstudio.Bootstrap path_to_archstudio.xml_file
You must specify an XML file that describes the ArchStudio 3 architecture to
start it. This file is contained in the archstudio/bin
directory.
So, if the current directory is the archstudio
directory, then
the command to start ArchStudio 3 might be:
java archstudio.Bootstrap bin/archstudio.xml
Of course, a backslash would be used on Windows machines. If successful, the ArchStudio 3 File Manager/Invoker should appear in the lower right corner of your screen.
Congratulations, you've started ArchStudio 3.
Developing Extensions for ArchStudio 3
Building extensions to ArchStudio 3 is relatively simple (in terms of setting
up a development environment to do so.) Because of how the Java CLASSPATH
works, it is possible to develop ArchStudio components without ever recompiling the
ArchStudio 3 source code. For instance, you can create a package called
archstudio.comp.myproject
in your own projects directory and it
will work seamlessly with other archstudio.comp.*
packages as long
as you keep archstudio.jar
on the CLASSPATH
.
To add your components to ArchStudio, you need to create a modified
archstudio.xml
file, which adds your component(s), connector(s), and
links to the ArchStudio 3 xADL 2.0 description.
If your component is nearing completion, you can contact Eric Dashofy about possible inclusion of the component in the next release of the ArchStudio 3 environment.
Modifying ArchStudio 3 Source Code
If your extensions to ArchStudio 3 require fundamental changes to existing ArchStudio 3 Java code (i.e. it's not possible to simply add components/connectors or rearchitect the application to affect the desired change) then you need to configure your Java development environment to compile the ArchStudio 3 source code. Please contact Eric Dashofy before doing this to ensure that your change will be compatible with future ArchStudio 3 releases and about including your changes in those future releases.
The source code for ArchStudio 3 (and related tools) is kept in a Subversion repository. Anyone can check out and build ArchStudio 3 from source. Detailed instructions for checking out and building ArchStudio 3 from source.
Comments? Questions?
Comments or questions on this tutorial should go to Eric Dashofy.