Home Page
The Sigaba Home Page
|
Introduction
There are many Sigaba simulators that can be downloaded, here is a selection
(sorry for not being exhaustive):
-
The oldest is that of R. Pekelney. It is graphical and written in Java
and uses the obsolete Applet technology. Several configurations require modifying
the source code.
-
The Pekelney's simulator is hosted by the maritime.org site. A new simulator
written in JavaScript by Steve MacMinn is supposed to replace it. It offers
generally the same functionalities.
-
Geoff Sullivan's simulator. It is graphical and very educational but only works
on old Windows versions.
-
Steve Baggett's simulator. It is graphic. It is very educational and its graphics
are very aesthetic. It is highly configurable. It works on Windows and Linux
.
-
George Lasry's simulator. It is written in Java. It works in text mode and
therefore it is portable. It is not configurable. Any configuration requires
modifying the source code.
-
My simulator. It is written in Python. It works in text mode and therefore it
is portable. It is configurable.
The Pekelney simulator, its installation
Presentation
R. Pekelney's software is the oldest Sigaba simulator. It is special because it
serves as a reference. In fact its author created it to be compatible with an
authentic Sigaba that he was able to study. Other simulators try to be compatible
with it.
The Pekelney simulator is graphical and written in Java. Its code is available.
It is therefore Open Source. It uses an old technology: Java applets. In fact, its
installation is more complex than for an ordinary Java application (for example,
the G. Lasry's simulator).
Java and Java applets
Java is a computer language that is still very popular (it is in the top 5 most
used languages but behind Python ;-). A Java application (*.java) must be compiled.
The generated bytecode (*.class) can run, via a Java virtual machine called JVM
(written in C language) on any OS (Windows, Linux, etc.) and on any hardware
(Intel, ARM, etc.).
A Java applet is a graphical application using the Applet API. It can work:
- In a browser (but no recent browser supports this technology anymore).
- Be activated via the appletviewer command.
Versions of Java and the Oracle company
Java is a language created by Sun company in 1995. At first, Java is a
proprietary technology, but in 2007, Sun changed the license of Java and released
the Java environment under the Open Source GPL-2 license. In 2009, Oracle bought
Sun and therefore inherited Java. Oracle creates its own JVM and then markets Java
with paid support. An individual can use Oracle tools free of charge by creating
an Oracle account.
The different Linux distributions use the free OpenJDK which includes the javac
compiler and the java JVM. On Windows, you have the choice of installing the official
Java version (from Oracle) or the Open Source version. Currently (2024), we
use Java version 22 but versions 8, 11, 17 and 21 are still supported. If you want
to use the Applet technology, you must install version 8 which includes the appletviewer
application (version 8 was previously called 1.8).
Installation under Windows 10
- Installing a free version of Java.
We download OpenJDK version 8 (which includes the appletviewer)
- From the site of
Microsoft
we choose OpenJDK 8.
- We switch to the site
Adoptium
- On the
Adoptium, website we choose:
- Windows (OS)
- x86 (hardware)
- JDK (which corresponds to all Java tools)
- 8-LTS (version)
- .msi (package format)
- The following
link is proposed, we activate it.
- We download the MSI version from
GitHub.
- Activate the downloaded application to install it
(click on it in the browser).
- Download the code source of the simulator and compile it.
- We create a working directory.
C:\> md sigaba
- We move inside.
C:\> cd sigaba
- We update the PATH
(if we want to make the operation persistent, we create a *.bat file)
C:\sigaba> set PATH=%PATH %;"C:\Program Files\Eclipse Adoptium\jdk-8.0.402.6-hotspot\bin"
- We download the source code of the Pekelney simulator.
C:\sigaba> curl -O https://maritime.org/tech/ecmapp.txt
- Then we correct the following bug with a text editor: lines 861 and 862 must be merged.
C:\sigaba> notepad ecmapp.txt
- Finally we rename the source:
C:\sigaba> ren ecmapp.txt ECMApp.java
- We compile the application:
C:\sigaba> javac ECMAapp.java
Note: compilation generates a warning: “Note: ECMApp.java uses or override a deprecated API”. We can ignore it.
- We create a web page which allows the activation of the applet
C:\sigaba> notepad ECMApp.html
|