diff --git a/Doc/Sd1/gettingStarted.xml b/Doc/Sd1/gettingStarted.xml index c8c49f5cce698376286b3571f5af672b3f1c7474..2748e1f29174faf4e8a87b0bf835ec00cc4a27a5 100644 --- a/Doc/Sd1/gettingStarted.xml +++ b/Doc/Sd1/gettingStarted.xml @@ -564,7 +564,7 @@ </section> <section xml:id="sd1SectToolsOfTheTrade1"> - <title>Tools of the trade, part 1</title> + <title>Using plain <xref linkend="glo_Java"/></title> <para>We outline the process of:</para> @@ -1340,7 +1340,7 @@ Hello, world</screen></td> <screen>>java HelloWorld <emphasis role="red">Hello, world</emphasis></screen> - <para>The file system reveals:</para> + <para>The file system view reads:</para> <screen>>ls -l -rw-r--r-- 1 goik fb1prof 426 Sep 25 10:45 HelloWorld.class @@ -1351,8 +1351,8 @@ Hello, world</screen></td> </question> <answer> - <para>The file system view tells us that - <filename>HelloWorld.class</filename> is about three minutes + <para>The file system reveals + <filename>HelloWorld.class</filename> being about three minutes older than <filename>HelloWorld.java</filename>:</para> <screen>>ls -l @@ -1365,19 +1365,21 @@ Hello, world</screen></td> <filename>HelloWorld.java</filename>. As a consequence the now outdated <filename>HelloWorld.class</filename> bytecode file was not replaced by a current version thus not reflecting the change - of <filename>HelloWorld.java</filename>.</para> + of <filename>HelloWorld.java</filename> and thus became + outdated.</para> - <para>This is a common beginner's error. Integrated development + <para>This is a common beginner's error: Integrated development environments like <xref linkend="glo_Soft_IntellijIDEA"/> and build tools like <xref linkend="glo_Maven"/> relieve you from - the burden of updating this type of dependency manually. We'll - <link linkend="sd1SectToolsOfTheTrade2">turn to those higher + the »manually keeping track of dependencies« burden: Editing a + source code file will trigger compilation automatically. We'll + <link linkend="sd1_sect_usingMavenIdea">turn to those higher level tools</link> after finishing our basic tour on <quote>pure</quote> <xref linkend="glo_Java"/> <command xlink:href="https://docs.oracle.com/javase/10/tools/javac.htm">javac</command> / <command xlink:href="https://docs.oracle.com/javase/10/tools/java.htm">java</command> - commands and basic text editing.</para> + commands and plain text source code editing.</para> </answer> </qandaentry> </qandadiv> @@ -1403,9 +1405,9 @@ SourceFile^A^@^OHelloWorld.java^L^@^G^@^H^G^@^W^L^@^X^@^Y^A^@^L<emphasis <orderedlist> <listitem> - <para>Use your text editor of choice overwriting the - contained String <code language="java">"Hello, world"</code> - by <code language="java">"Software joy"</code> in + <para>Use your favourite text editor for overwriting the + string <code language="java">"Hello, world"</code> by <code + language="java">"Software joy"</code> in <filename>HelloWorld.class</filename> (Not in <filename>HelloWorld.java</filename>!).</para> @@ -1417,14 +1419,14 @@ SourceFile^A^@^OHelloWorld.java^L^@^G^@^H^G^@^W^L^@^X^@^Y^A^@^L<emphasis role="red">Software joy</emphasis>^G^@^Z^L^@^[^@\ ...</screen> - <para>Try to execute this bytecode file. What do you - observe?</para> + <para>Try to execute this bytecode file (without + recompiling). What do you observe?</para> </listitem> <listitem> - <para>Repeat the process starting from a sound - <filename>HelloWorld.class</filename> file but this time use - a binary editor like <command + <para>Recompile and repeat the process starting from a sound + <filename>HelloWorld.class</filename> file. This time use a + binary editor like <command xlink:href="https://linux.die.net/man/1/hexedit">hexedit</command> or <command xlink:href="https://manpages.debian.org/unstable/ghex/ghex.1.en.html">ghex</command> @@ -1474,8 +1476,8 @@ Error: LinkageError occurred while loading main class HelloWorld java.lang.ClassFormatError: Extra bytes at the end of class file HelloWorld </screen> - <para>This error actually depends on the text editor you are - using. When using <command + <para>This error actually depends on your text editor + choice: When using <command xlink:href="https://www.vim.org">vim</command> or <command xlink:href="https://www.nano-editor.org">nano</command> analyzing the modified bytecode file's content reveals the @@ -1511,7 +1513,8 @@ Error: LinkageError occurred while loading main class HelloWorld <para>The <command xlink:href="https://linux.die.net/man/1/emacs">emacs</command> - editor for example won't cause this problem.</para> + editor for example refrains from auto-adding newlines and + doesn't cause this problem.</para> </listitem> <listitem> @@ -1554,10 +1557,12 @@ Error: LinkageError occurred while loading main class HelloWorld <screen>00 08 07 00 17 0C 00 18 00 19 01 00 0C <emphasis role="red">48 65 6C 6C 6F 2C 20 77 6F 72 6C 64</emphasis> 07 00 1A - <emphasis role="red">▲</emphasis> - <emphasis role="red">┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛</emphasis> - <emphasis role="red">▼</emphasis> -.............<emphasis role="red">Hello, world</emphasis>...</screen> + <emphasis role="red">▲</emphasis> <emphasis + role="red">▲</emphasis> + <emphasis role="red">┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛</emphasis> <emphasis + role="red">┃</emphasis> + <emphasis role="red">▼</emphasis> will be overridden +.............<emphasis role="red">Hello, world</emphasis>... by »!« or 21</screen> <para>Thus appending an exclamation mark will override the hexadecimal <code language="java">07</code> value @@ -1566,7 +1571,9 @@ Error: LinkageError occurred while loading main class HelloWorld language="java">21 (<xref linkend="glo_ASCII"/> for <quote>!</quote>)</code>. Apparently this value serves some purpose with respect to the virtual machine and must - therefore not be altered.</para> + therefore not be altered. This is the byte code verifier's + responsibility as being outlined in <xref + linkend="sd1_fig_imageco_executeJava"/>.</para> </listitem> </orderedlist> @@ -2054,8 +2061,9 @@ loop # 12</screen> </section> </section> - <section xml:id="sd1SectToolsOfTheTrade2"> - <title>Tools of the trade, part 2</title> + <section xml:id="sd1_sect_usingMavenIdea"> + <title>Using <xref linkend="glo_Maven"/> and <xref + linkend="glo_Soft_IntellijIDEA"/></title> <figure xml:id="sd1_fig_ideaDownload"> <title>Downloading IntelliJ idea</title>