# DMelt:General/1 Installation

Limitted access. First login to DataMelt if you are a full DataMelt member. Then login to HandWiki as a user.

# Installation

DataMelt (DMelt) program is a self-contained software that can be ran using Java Virtual Machine (JVM). The current version of DMelt can be executed using JDK8 and above.

First, make sure that the JAVA virtual machine is installed. Simply click on Java check link to verify JAVA version. For Linux/Mac, you can also check the JAVA by typing in the terminal:

 java -version 

You will see:

java version "1.8.0_10"
Java(TM) SE Runtime Environment (build 1.8.0_10-b06)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)

or a similar message. You can install Java using this link Java install page. You can also install JAVA JDK (for developers) from the Oracle JAVA download page. The JDK JAVA version allows you to compile JAVA code using the "javac" compiler. Linux/Mac users usually have JAVA installed by default.

# DataMelt Installation

### Installation for Linux/Mac OS

wget -O dmelt.zip http://sourceforge.net/projects/dmelt/files/latest/download
unzip dmelt.zip
./dmelt.sh     # run DMelt IDE using Limux/Mac console.

This means you should set your console to the "bash" mode (otherwise, type "bash" before launching this script).

One can also use a development (unstable) version from DataMelt.Org:

wget -O dmelt.zip https://datamelt.org/download/current.php
unzip dmelt.zip
./dmelt.sh     # run DataMelt IDE

You can also run scripts without the GUI. Look at the section Running DMelt.

First time start-up takes a bit longer then usual since Jython caches the Java jar libraries (it creates the directory "jython/cachedir" with the description of all classes located in jar files defined in the CLASSPATH variable.).

### Installation for Windows

You can run DataMelt on Windows 10/8/7. Download and unzip the dmelt-[VERSION].zip file from DataMelt download page, where [VERSION] is a version number. This creates the directory dmelt-[VERSION]. Go to the subdirectory "dmelt", and click the file dmelt.bat. This file will launch the DataMelt IDE.

Note: If you run "dmelt.bat", you need to set the variable JAVA_HOME and PATH to your Java installation. Look at the tutorial How to set JAVA_HOME on Windows 10.

# Generic installation using jPort menu

Instead of unzipping the DMelt files, consider using the jPort portable Java menu. This method works for all platforms (Windows, Linux and Mac), and you can carry DMelt on a USB flash drive. In addition, you can install other jWork.ORG applications.

DataMelt always puts its installation files inside the "dmelt" directory. It never modifies your Windows system files nor changes the Windows settings. This means that removal of DMelt is very simple - just delete the directory "dmelt"!

For Mac, Linux and UNIX, you can put the file "dmelt.sh" to the

\$HOME/bin


directory, so you can start DMelt from any directory. In this case, you should set the variable "JEHEP_HOME" (defined inside the script "dmelt.sh") to the directory path where the file "jehep.jar" is located.

# 3rd party restricted libraries

You can download some external 3rd party libraries after you started DataMelt GUI. In the BeanShell interactive prompt, execute the command:

get_external()


This will download some libraries which are usually have some license limitations for commercial use. For example, this will install Michael Thomas Flanagan's Java Scientific Library from the the official web page.

# Quick check of examples

You can run all DMelt examples using the menu [Help]-[Examples]. This brings up a window with free examples. Select any file and click [Run] (from this dialogue, not from the IDE toolbar). Look at the YouTube DMelt clip which shows DMelt Online examples.

You can also use free examples using [Online examples]. You can run and view only free examples (marked with the red letter F). If you activated DMelt-Pro, you can view and run all of the examples.

# Activation of DMelt-Pro

If you have a full membership, you can activate DMelt-Pro like this: download and run the free DMelt version. Then, go to the DMelt toolbar and select [Help]→[Activate DMelt-Pro]. You need to enter your username and password, exactly as for DMelt membership web page.

DMelt-Pro can be used for a commercial purpose, plus it has full access to built-in examples [Help]→[Online examples], full Java API, online examples,source code etc.

In a few situations, the activation may fail (when, for example, you do not have correct network settings). Then, you will have to request the password by sending a email to dmelt [at] jwork.org

# Updating DMelt

Simply remove the directory "dmelt" (if you did not create your files inside the directory "dmelt"!). Then unzip the zip file with a new version. DMelt periodically checks that you are running the most updated version.

If you are using DMelt-Pro (professional) version, you should receive updates of separate jar libraries on a regular basis and thus there is no need to reinstall the entire program. This helps keep all of the numerical libraries on your computer up-to-date.

# Uninstalling DMelt

To uninstall DMelt is simple: just remove the directory "dmelt" with your installation (for windows/linux/mac). DataMelt never leaves any files in your system directory or changes Windows register.

# Libraries for Eclipse and NetBeans

You can download single-jar file which does not contain IDE. This jar files can be used for import to Eclipse or NetBeans IDE (both good to work with Python or Java). These jar files are available for DataMelt full members as described here [DMelt:General/6_Netbean]. You can also download a minimalistic jar file (~10MB) which can be deployed for applets.

# CBook package

If you are working with a C++ program and you will need to visualize data using Java or Jython, then you will need the CBook C++ package This package allows you to fill histograms and vectors in a C++ code, and write them in a "pbu" file which contains zipped data records based on the Google's Protocol Buffers format. One can read such files using the jhplot.io.PFile class of DataMelt. In addition, one can write structural data using a C++ code and read them back using DataMelt (class EFile).

# Installation for multiple users

The description discussed above concerns a single-use installation. It may be convenient to install DMelt in a central location (for example on a shared directory on NFS) so all users will be able to run run the program. Below is a step-by step instruction describing how to do this.