Development Environment Configuration

From VariaMos Wiki
Jump to: navigation, search

How to start developing on VariaMos from the technical perspective on Windows X64 environments:


Java 1.7 or 1.8 (64 bits)

SWIProlog 7.2.3.* 64 bits

Eclipse Luna for Java Developers

The 32 bits version has non-solved configuration problems and it is not recommend.

  • Tested also with Version 7.4.2

System configuration:

Configure the following system variables:

CLASSPATH=.;C:\Program Files\swipl\lib\jpl.jar;C:\Program Files\swipl\lib\

Path=C:\Program Files\swipl\lib\jpl.jar;C:\Program Files\swipl\bin;%Path%

Restart Windows


Create an account on GitHub

Access the VariaMos fork: and create a fork on your own account

Copy the HTTPS clone URL from your new fork

You can learn to use Git at

Then you can also learn to use Github at

Clone on Eclipse:

Open eclipse with a new Workspace and Import... Project from Git

Select Clone URI, the copied URI should be displayed.

Provide your github credentials.

Select the master and development branches.

Select the desired folder for Git local clone (different from your workspace) and select development as the initial branch.

Import existing projects and wait the process to finish.

Eclipse SWI Prolog configuration:

Look for com.variamos.gui.editor.Main on the project com.variamos.gui.

Right click and open Run Configurations... within the Run As menu.

Open Main under Java Application and select (x)= Arguments tab.

On the Program arguments box include:

noupdate debug (this is important to avoid the report of fake execution statistics. Also, to show all the errors and messages on Eclipse instead of the application console).

On the VM arguments box include:

-Djava.library.path="C:\Program Files\swipl\bin;."

After saving the configuration you should be able to run VariaMos correctly. The noupdate program argument blocks the search for new versions and execution counter (registered at The debug program argument allows to view the errors on the eclipse's console. The VM arguments allow the use of SWI Prolog functions.

Activate autoformat for code:

Open the Preferences (Window menu).

Search for: Save actions and activate the following options

Perform the selected actions on save

Format source code (all lines)

Organize imports

Additional actions

Define upstream remote repository:

An upstream remote repository is required to obtain updates from the source code.

Open the view Git Repositories

Right click on Remotes, Create Remotes...

Define the name (upstream), configure fetch

Paste the URI

Change the mapping to development (click Advanced... delete the existing mapping and create a development mapping)

To create the development mapping in the Fetch Ref Specifications, select ref/head/development in the Source ref field and refs/remotes/upstream/development in Destination ref field. Then click Add Spec and remove the other.

Update from upstream remote repository:

Right click on the project, Team, Remote, Fetch from..

Select the upstream remote repository

If the development sources are set (if not follow the last step in the previous section), click finish.

Right click on the project, Team, Merge (Or Rebase)

Resolve conflict with you local code if any (edit the conflicting files).

Change to Team Synchronizing view

Select for the elements Mark as Merged (after the conflicts are resolved).