Program | Myriarch for Java |
---|---|
Version | 2.1.0 (History) |
Released | 16 April 2021 |
Author | Christoph Nahr (Copyright) |
Contact | webmaster@kynosarges.org |
Website | kynosarges.org/Myriarch.html |
Myriarch is a Java Swing GUI application that should work on any 64-bit operating system with a current Java Runtime Environment (JRE). The minimum requirement is Oracle Java SE 8 or compatible, such as OpenJDK. Users of high DPI displays should note that Java SE 9 or later is required for high DPI scaling.
Some hyperlink actions rely on Java’s multiplatform support for invoking default applications, such as web browsers and mail clients. These should work on all desktop platforms, assuming your applications are properly configured to handle the desired URLs or file types. If some action is entirely unsupported on your platform, the hyperlink’s tool tip will state that fact.
The directory to which the binary package was unpacked contains the following files:
ReadMe.html | This file |
WhatsNew.html | Myriarch version history |
project.css | Style sheet for ReadMe & WhatsNew |
Myriarch.jar | Myriarch GUI executable (requires Java Swing) |
Myriarch.Core.jar | Myriarch core algorithms (see below) |
Tektosyne.jar | Tektosyne library for computational geometry |
apache/* | Apache Batik license files (see below) |
help/* | Myriarch help system (show with index.html ) |
scenario/* | Simulation scenarios |
These files are all you need to run Myriarch. Java programmers may also want to download the source package which is available separately.
Use the command line javaw -jar Myriarch.jar
to run Myriarch. Depending on your JVM, you may also be able to omit javaw -jar
and execute Myriarch.jar
directly, or to simply double-click on Myriarch.jar
in your favorite file explorer.
Myriarch supports the command line argument LAF=…
for selecting a Java Swing Look & Feel. The default is Nimbus, the only other tested L&F is Metal. Other L&Fs should work but possibly with display issues.
For more information on how to run a simulation, please see the integrated help system (Help button, F1). Use New to start a new simulation. Currently only Leuctra 371 BC is available.
Myriarch creates a folder called Myriarch
in the current user’s home directory to store saved simulations. If creation of that folder fails, Myriarch will attempt to store simulations directly in the current user’s home directory.
The source package is available as a separate download on the Myriarch home page. The expected environment is IntelliJ IDEA 2021.1 with Oracle JDK 10.0.2. This package contains all of the files in the binary package, except for the precompiled Java archives, plus the following for each project:
*.iml | IntelliJ project file |
.idea/* | IntelliJ project metadata |
javadoc/* | Javadoc class reference (once, combined) |
res/* | Embedded resources |
src/* | Source code and JAR manifest |
test/* | Unit tests where applicable |
The source package does not include standard build files (e.g. Ant) but you can simply download the free IntelliJ Community Edition and generate such files from the project.
The source package contains the required Tektosyne library project and two IntelliJ projects for Myriarch: the main project Myriarch
for the Swing-based GUI executable, and the library project Myriarch.Core
with the actual simulation algorithms. Myriarch.Core
requires only the Java SE 8 Compact 1 profile, or the JVM modules java.base
and java.xml
on Java SE 9 and later, so you can use it on platforms that don’t support Java Swing.
Myriarch.Core
contains an executable command-line runner intended for debugging and benchmarking the simulation code. Start the runner with java -jar Myriarch.Core.jar
as usual. The built-in scenario Leuctra 371 BC will begin, with situation updates printed on each checkpoint. When finished the runner will save the simulation, then reload and replay the saved simulation. Edit Runner.java
to change the executed actions.
The Java Swing file chooser only regards the part of a file name after its last dot as its extension. Therefore, the preselected compressed format .xml.gz
will show any files that end with .gz
, not just .xml.gz
files. Moreover, when saving simulations, the extension of the selected format is not shown on the current file name. However, it will be correctly appended before the file is saved, unless you type it in explicitly.
All files – individual files, multi-file packages, and individual files contained in multi-file packages – that constitute the original distribution of Myriarch are Copyright © 2012–2021 by Christoph Nahr, except where otherwise noted.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
All user interface icons are rendered from the embedded Font Awesome by Dave Gandy, available under the Font Awesome Free License. This font is present as the separate file Myriarch/res/FontAwesome.ttf
in the source code package.
The application icon is taken from the replica of a decorated Corinthian helmet whose picture I found online somewhere in January 2012. Unfortunately I forgot to take note of the source and cannot find this exact model now, though there are plenty of similar helmets on offer.
The method SVGtoPath2D.convertArc
is adapted from method ExtendedGeneralPath.arcTo
in package org.apache.batik.ext.awt.geom
of the Apache Batik Project, available under the Apache License, version 2.0. You can find a copy of this license and of the Apache Batik NOTICE
file in directory apache
.