Jhanu development setup

This section explains how to create a local developer environment

 

Step 1: Install required software

To install and run Jhanu for a local developer environment you must:

 

Step 2: Set the environment variables

The following environment variables must be set on your computer - replace the <xxx-xxx-directory> placeholders with the paths to those folders. View the above video or the tips below if you need help setting these.

JAVA_HOME = <jdk-home-directory>
M2_HOME = <maven-home-directory>
M2 = <maven-bin-directory>
PATH should contain <jdk-bin-directory> and <maven-bin-directory>

2.1 for Windows users

On Windows, you can use the Control Panel or the Command Prompt to set the variables.

 

If using the Control Panel:

  1. Navigate to the correct system settings:For Windows 7: Right click My Computer, Click Properties, Click Advanced.For Windows 8: Navigate to Control Panel, Click System, Click Advanced System Settings.For Windows 10: Search for Environment Variables, click Edit the System Environment Variables.
  2. Click the Environment Variables button.
  3. Navigate to System Variables and select New.
  4. In the Variables field, enter: Variable Name: MY_VARIABLE_NAME Variable Value: my_variable_value
  5. Variable Name: MY_VARIABLE_NAME
  6. Variable Value: my_variable_value

 

If using the Command Prompt:

  1. Open the Command Prompt as Administrator
  2. Set the variable name and value by executing the following command:  setx /M MY_VARIABLE_NAME “my_variable_value”
  3. Restart the Command Prompt to reload the environment variables and check the  new variable as follows: echo %MY_VARIABLE_NAME%

 

2.2 for MAC/Linux users

On OSX, the variables need to be added in the .bash_profile file or .zshrc file depending on the Terminal type you are using, for example:

 

export JAVA_HOME="$(/usr/libexec/java_home -v1.8)"

export M2_HOME=/opt/apache-maven-3.6.2

export M2=$M2_HOME/bin

export PATH=$PATH:$M2

 

Reopen your Terminal to see changes take effect.

Step 3: Verify installation

 

Verify that Maven, Docker, Docker-Compose and Java are installed correctly by executing the following commands:

1. javac -version
2. docker-compose --version
3. docker --version
4. mvn --version

 

Step 4: Download the Jhanu Server

 

We have provided you with a server which you can use to install your first platform. Use the link below to download it.

Click here to download your server

Once you’ve downloaded this .zip file, move it to an easily accessible location and extract its contents.

 

Step 5: Run PostgreSQL using Docker

 

This steps are explained in this video

 

 

Start a terminal session to launch PostgreSQL with Docker. Navigate to the jhanu_database folder and execute the following command:

docker-compose up

Start an other terminal session to create the database, tables and initial data (this is a one time step). To do that, execute the following command (you must be into the jhanu_database folder)

mvn sql:execute

wait until all objects are created, then uncompress the jhanu_tomcat.tar.gz file, go into the jhanu_apache-tomcat-9.0.55/bin folder and execute the following command:

./startup.sh

Open a web browser end enter into the following url:

http://localhost:8080/Jhanu

Use the following credentials:

username: admin@localhost.com

password: admin

 

 

Step 6: Install the video tutorial examples

 

Follow the instructions described in the following URL:

https://github.com/felipediazc/jhanuexamples