<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TLA+ &#124; The way to specify&#187; instruction</title>
	<atom:link href="http://www.tlaplus.net/tags/instruction/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tlaplus.net</link>
	<description>The TLA+ and PlusCal Resource</description>
	<lastBuildDate>Fri, 20 Jan 2012 20:26:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to install TLA+ Tools</title>
		<link>http://www.tlaplus.net/posts/2009/08/how-to-install-tla-tools/</link>
		<comments>http://www.tlaplus.net/posts/2009/08/how-to-install-tla-tools/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 07:48:46 +0000</pubDate>
		<dc:creator>Simon Zambrovski</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[instruction]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tla+ tools]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.tlaplus.net/?p=113</guid>
		<description><![CDATA[This tutorial provides a description of the installation procedure of the console-based version of TLA+ Tools. Separate directions for completing the installation on Windows and on Unix are provided. Please download the latest copy of the TLA+ Tools in the Tools Section. Also make sure that the Java Runtime Environment (at least version 1.4) is [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float: left; margin: 10px;" title="How to install TLA+ Tools" src="/wp-content/uploads/2009/08/wrench-150x150.jpg" alt="How to install TLA+ Tools" width="100" height="100" /><br />
This tutorial provides a description of the installation procedure of the console-based version of TLA+ Tools. Separate directions for completing the installation on Windows and on Unix are provided.<span id="more-113"></span><br />
Please download the latest copy of the TLA+ Tools in the <a href="/tools/tla-tools">Tools Section</a>. Also make sure that the Java Runtime Environment (at least version 1.4) is installed on your machine. You can download a version from the <a href="http://java.sun.com/javase/downloads/index.jsp">homepage of Sun Microsystems</a>.</p>
<h3>Installation on Windows</h3>
<p>Choose (or create) a folder into which you want to put the tools and unzip the downloaded file into it. Suppose your folder is <code>c:\user\myfolder</code>, the sub folder named <code>tla</code> will be created in it, which contains the tools. Add <code>c:\user\myfolder\tla</code> to your CLASSPATH environment variable. How you do that depends on what version of Windows you&#8217;re using:</p>
<h4>Non-Ancient Versions of Windows</h4>
<p>Open <em>Start &gt; Settings &gt; ControlPanel</em>. On the <em>Control Panel</em>, open <em>System</em>, click on <em>Advanced</em> tab and open the <em>Environment Variables</em>, then look for the <code>CLASSPATH</code> variable among user or system variables.  If it exists, append <code>;c:\user\myfolder\tla</code> to the end of its value. If not, create a new <code>CLASSPATH</code> variable whose value is <code>c:\user\myfolder\tla</code>.</p>
<h4>Windows 95 (and MS-DOS)</h4>
<p>Modify your AUTOEXEC.BAT file. If there is a command<br />
<code>set CLASSPATH = c:\foo\bar;d:\myjava\files</code><br />
then change it to<br />
<code>set CLASSPATH = c:\foo\bar;d:\myjava\files;c:\user\myfolder\tla</code><br />
If there is no such command in the file, then add<br />
<code>set CLASSPATH = c:\user\myfolder\tla</code><br />
to your AUTOEXEC.BAT file.</p>
<h3>Installation on UNIX</h3>
<p>Choose (or create) a directory into which you want to put the tools and unzip the downloaded file into that directory. Suppose that your directory is <code>/udir/user/mydir</code>, the sub directory named <code>tla</code> will be created in it, which contains the tools. Add <code>/udir/user/mydir/tla</code> to the <code>CLASSPATH</code> environment variable. Assuming you&#8217;re running the C-shell or some derivative, you do this by typing<br />
<code>setenv CLASSPATH /udir/user/mydir/tla</code><br />
However, you&#8217;ll probably want to have the <code>CLASSPATH</code> variable set automatically when you login.  To do this, your <code>.login</code> or <code>.csh</code> file must contain a command to set that variable.  If a command<br />
<code>setenv CLASSPATH ...</code><br />
already exists in your <code>.login</code> or <code>.csh</code> file, just add the command<br />
<code>setenv CLASSPATH $CLASSPATH":/udir/user/mydir/tla"</code><br />
after it. Otherwise, just add the command<br />
<code>setenv CLASSPATH /udir/user/mydir/tla</code></p>
<h3>Validation of the installation</h3>
<p>In order to validate if the TLA+ tools has been successfully installed, first create a file <code>test.tla</code> and paste the following content into it:</p>
<pre class="brush: bash; title: ; notranslate">
---- MODULE test ----
====
</pre>
<p>Then open the console (<em>Start</em> &gt; <em>Run</em> &gt; <code>cmd</code> on Windows) in the directory, the file is located in and type: <code>java tla2sany.SANY test</code>. If you did everything right, you should see:</p>
<pre class="brush: bash; title: ; notranslate">
****** SANY2 Version .91 created 10 April 2008
Parsing file test.tla
Semantic processing of module test
</pre>
<p>If you see</p>
<pre class="brush: bash; title: ; notranslate">
Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: tla2sany/SANY
Caused by: java.lang.ClassNotFoundException: tla2sany.SANY
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: tla2sany.SANY.  Program will exit.
</pre>
<p>you probably misspelled the <code>CLASSPATH</code>. If you see something like:</p>
<pre class="brush: bash; title: ; notranslate">
'java' is not recognized as an internal or external command,
operable program or batch file.
</pre>
<p>you are missing the JRE.</p>
<h3>Running from a script</h3>
<p>In some scenarios, setting up the global CLASSPATH variable is not desirable. In this case it is possible to create scripts for each tool which set the CLASSPATH only for the execution. Here is an example script for calling SANY on Windows:</p>
<pre class="brush: bash; title: ; notranslate">
set TLA_PATH=c:/tools/tla2
java -cp %TLA_PATH% tla2sany.SANY %1 %2 %3 %4
</pre>
<p>The script should be invoked with the name of the TLA file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tlaplus.net/posts/2009/08/how-to-install-tla-tools/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

