Browser GUI Installation
mainly for UNIX
(But the general technique can be used for Windows... some of the system line commands are different)
(But the general technique can be used for Windows... some of the system line commands are different)
This installation describes a local installation using UNIX terminal commands. This means on either a MacOS system or some variant of Linux. The installation for a windows machine is very similar and the general procedure is the same. This installation assumes that the mySQL database has been setup (this is described here).
The setup has basically the following steps:
Compiling the system depends on several software packages:
The source code of the JThermodynamics system can be found on GitHub. To compile the system, you need to download (clone) the system to your local computer. This is done with a git command using the Git version control system. If it is not already installed, you can find instructions here.
To clone the system, there are basically two steps to perform:
git clone https://github.com/blurock/JThermodynamics.git
The following is the procedure in more detail.
To download the three packages of the JThermodynamics system, first go to the directory of your local computer where you want the cloned source code to be stored. As a note, the cloned system is created under a single directory called 'JThermodynamics'.
The command to clone the system is:
git clone https://github.com/blurock/JThermodynamics.git
The output should look something like:
Cloning into 'JThermodynamics'...
remote: Enumerating objects: 362, done.
remote: Counting objects: 100% (362/362), done.
remote: Compressing objects: 100% (297/297), done.
remote: Total 1146 (delta 48), reused 342 (delta 34), pack-reused 784
Receiving objects: 100% (1146/1146), 95.80 MiB | 5.58 MiB/s, done.
Resolving deltas: 100% (282/282), done.
After this command, using the command, ls,
we see that one directory has been created:
JThermodynamics
Going into this directory and doing ls
again shows the three (actually four, but one is ignored for now) packages:
>> cd JThermodynamics/
>> ls
JTherGas JThermodynamicData JThermodynamicsWebInterface README.md ThermodynamicInterface
Each one of the directories has the source code for each package.
The packages are organized using Maven which is a convenient way to compile and package code and keep track of dependencies. To use Maven, you have to download it. The instructions are found here.
A summary of the steps to compile the system are shown here (details are shown afterward for those interested):
JTherGas
, JThermodynamicsData
and ThermodynamicInterface
)cd JTherGas
(go into the JTherGas directory)mvn clean compile package install
(compile and install the whole package)cd ../JThermodynamicData
(hop to the next package)mvn -Dmaven.test.skip=true clean compile package install
(compile and install the whole package)mvn -Dmaven.test.skip=true clean compile package install
(compile and install the whole package)Now all the packages are installed in the local Maven repository on your local machine.
At the end of each mvn -Dmaven.test.skip=true clean compile package install
, if the command was successful, then you should see something like:
Installing /Users/edwardblurock/thermo/JThermodynamics/JThermodynamicData/target/JThermodynamicData-1.0.jar to /Users/edwardblurock/.m2/repository/info/esblurock/JThermodynamicData/1.0/JThermodynamicData-1.0.jar
[INFO] Installing /Users/edwardblurock/thermo/JThermodynamics/JThermodynamicData/pom.xml to /Users/edwardblurock/.m2/repository/info/esblurock/JThermodynamicData/1.0/JThermodynamicData-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.041 s
[INFO] Finished at: 2020-12-30T11:39:13+01:00
[INFO] Final Memory: 32M/117M
[INFO] ------------------------------------------------------------------------
You can see that the install command put the jar file (all the compiled code) in my local repository:
<home_directory>/.m2/repository/info/esblurock/JThermodynamicData/1.0/JThermodynamicData-1.0.jar
The position in the repository was determined by the pom.xml
file having the section:
<version>1.0</version>
<groupId>info.esblurock</groupId>
<artifactId>JThermodynamicData</artifactId>
The package JThermodynamicData
, version 1.0
, is stored in repository directory info/esblurock
(from the groupId info.esblurock
). All the packages have this same groupID.
You may need to modify may parameters in the Jthermodyanmics.properties file. First is the connector to the mySQL database:
thermo.database.connection=jdbc:mysql://localhost:3306/thermodynamics
The other line you may have to modify is:
thermo.database.dbpassword=password
Replace 'password' with the root password you gave when you installed the mySQL database.
To deploy the interface so it appears in the browser the script setup.sh
is used. This script takes 4 arguments regarding the mySQL database:
mysqlhost
: The mySQL host (for example, localhost)mysqlport
: The port of mySQL (typically, 3306)mysqldatabase
: The database namemysqlpassword
: The root passwordThe script sets in the connection point to the mySQL database and then starts the deployment. The parameters to script depend on the parameters you used to set up the mySQL database. The script is started in the top directory of ThermodynamicInterface:
mvn clean appengine:run
If the deployment is successful, the last lines you should see are something like:
[INFO] GCLOUD: INFO: The admin console is running at http://localhost:8080/_ah/admin
[INFO] GCLOUD: Dec 30, 2020 3:14:34 PM com.google.appengine.tools.development.DevAppServerImpl doStart
[INFO] GCLOUD: INFO: Dev App Server is now running
The job is left running, no terminal prompt should be seen. To end the deployment, the ctrl-c can be typed.