javaclass

Change of docs/index.html

152:805aa0c63c2f
docs/index.html
     1.1 --- a/docs/index.html	Sun Jan 23 01:53:35 2005 +0100
     1.2 +++ b/docs/index.html	Sun Jan 23 01:53:35 2005 +0100
     1.3 @@ -29,76 +29,63 @@
     1.4  <p>You can run Java classes by finding one with a main method and executing
     1.5  it. Here's a comparison of a freshly prepared Java class being run in Python
     1.6  and in a Java virtual machine respectively:</p>
     1.7 -
     1.8 -<p class="prompt">cd tests/</p>
     1.9 -
    1.10 -<p class="prompt">javac Value.java</p>
    1.11 -
    1.12 -<p class="prompt">runclass.py Value</p>
    1.13 -
    1.14 -<p class="result">v.getValue() correct: 123<br />
    1.15 -v.getValue() correct: 456<br />
    1.16 -v.isPositive() correct: 1<br />
    1.17 -v.isPositive() correct: 0<br />
    1.18 -v.compare(-790) correct: -1<br />
    1.19 -v.compare(-788) correct: 1<br />
    1.20 -v.compare(-789) correct: 0<br />
    1.21 -v.getValue() == v2.getValue() correct: 0<br />
    1.22 -v2.add(-123) correct: 0<br />
    1.23 -v2.getValue() correct: 255</p>
    1.24 -
    1.25 -<p class="prompt">java Value</p>
    1.26 -
    1.27 -<p class="result">v.getValue() correct: 123<br />
    1.28 -v.getValue() correct: 456<br />
    1.29 -v.isPositive() correct: true<br />
    1.30 -v.isPositive() correct: false<br />
    1.31 -v.compare(-790) correct: -1<br />
    1.32 -v.compare(-788) correct: 1<br />
    1.33 -v.compare(-789) correct: 0<br />
    1.34 -v.getValue() == v2.getValue() correct: false<br />
    1.35 -v2.add(-123) correct: 0<br />
    1.36 -v2.getValue() correct: 255</p>
    1.37 +<pre class="Prompt">cd tests/</pre>
    1.38 +<pre class="Prompt">javac Value.java</pre>
    1.39 +<pre class="PromptRequest">runclass.py Value</pre>
    1.40 +<pre class="PromptResponse">v.getValue() correct: 123
    1.41 +v.getValue() correct: 456
    1.42 +v.isPositive() correct: 1
    1.43 +v.isPositive() correct: 0
    1.44 +v.compare(-790) correct: -1
    1.45 +v.compare(-788) correct: 1
    1.46 +v.compare(-789) correct: 0
    1.47 +v.getValue() == v2.getValue() correct: 0
    1.48 +v2.add(-123) correct: 0
    1.49 +v2.getValue() correct: 255</pre>
    1.50 +<pre class="PromptRequest">java Value</pre>
    1.51 +<pre class="PromptResponse">v.getValue() correct: 123
    1.52 +v.getValue() correct: 456
    1.53 +v.isPositive() correct: true
    1.54 +v.isPositive() correct: false
    1.55 +v.compare(-790) correct: -1
    1.56 +v.compare(-788) correct: 1
    1.57 +v.compare(-789) correct: 0
    1.58 +v.getValue() == v2.getValue() correct: false
    1.59 +v2.add(-123) correct: 0
    1.60 +v2.getValue() correct: 255</pre>
    1.61  
    1.62  <h3>The Slightly More Credible Example</h3>
    1.63  
    1.64  <p>It can be more interesting to get into Python's interactive mode and then
    1.65  start playing around with Java classes:</p>
    1.66 -
    1.67 -<p class="python-result">Python 2.2.2 (#2, Jan 21 2005, 16:16:57)<br />
    1.68 -[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-112)] on linux2<br />
    1.69 -Type "help", "copyright", "credits" or "license" for more information.</p>
    1.70 -
    1.71 -<p class="python-prompt">import javaclass.classhook</p>
    1.72 -
    1.73 -<p class="python-prompt">from __this__ import Value</p>
    1.74 -
    1.75 -<p class="python-prompt">dir()</p>
    1.76 -
    1.77 -<p class="python-result">['Value', '__builtins__', '__doc__', '__name__',
    1.78 -'javaclass']</p>
    1.79 -
    1.80 -<p class="python-prompt">dir(Value)</p>
    1.81 -
    1.82 -<p class="python-result">['__class__', '__delattr__', '__dict__', '__doc__',
    1.83 +<pre class="PromptResponse">Python 2.2.2 (#2, Jan 21 2005, 16:16:57)
    1.84 +[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-112)] on linux2
    1.85 +Type "help", "copyright", "credits" or "license" for more information.</pre>
    1.86 +<pre class="PythonPrompt">import javaclass.classhook</pre>
    1.87 +<pre class="PythonPrompt">from __this__ import Value</pre>
    1.88 +<pre class="PythonPrompt">dir()</pre>
    1.89 +<pre class="PromptResponse">['Value', '__builtins__', '__doc__', '__name__',
    1.90 +'javaclass']</pre>
    1.91 +<pre class="PythonPrompt">dir(Value)</pre>
    1.92 +<pre class="PromptResponse">['__class__', '__delattr__', '__dict__', '__doc__',
    1.93  '__getattribute__', '__hash__', '__init__', '__init______I_', '__module__',
    1.94  '__new__', '__reduce__', '__repr__', '__setattr__', '__str__', '__weakref__',
    1.95  'add', 'add____I_', 'compare', 'compare____I_', 'getClass', 'getClass___',
    1.96  'getValue', 'getValue___', 'isPositive', 'isPositive___', 'main',
    1.97  'main___java__lang__String_array_', 'newValue', 'newValue___', 'setValue',
    1.98 -'setValue____I_']</p>
    1.99 -
   1.100 -<p class="python-prompt">v = Value(20050121)</p>
   1.101 -
   1.102 -<p class="python-prompt">v.getValue()</p>
   1.103 +'setValue____I_']</pre>
   1.104 +<pre class="PythonPrompt">v = Value(20050121)</pre>
   1.105 +<pre class="PythonPrompt">v.getValue()</pre>
   1.106 +<pre class="PromptResponse">20050121</pre>
   1.107 +<pre class="PythonPrompt">v.setValue(20050401)</pre>
   1.108 +<pre class="PythonPrompt">v.getValue()</pre>
   1.109 +<pre class="PromptResponse">20050401</pre>
   1.110  
   1.111 -<p class="python-result">20050121</p>
   1.112 -
   1.113 -<p class="python-prompt">v.setValue(20050401)</p>
   1.114 +<h2>Copyright and Licence</h2>
   1.115  
   1.116 -<p class="python-prompt">v.getValue()</p>
   1.117 -
   1.118 -<p class="python-result">20050401</p>
   1.119 +<p>The javaclass software is distributed under the terms of the GNU Lesser
   1.120 +General Public Licence (LGPL). See the file <code>COPYING.txt</code> in the
   1.121 +<code>docs</code> directory within the source code distribution.</p>
   1.122  
   1.123  <h2>Getting Started</h2>
   1.124