Difference between revisions of "How to launch a GenPlay jar file"
From GenPlay, Einstein Genome Analyzer
(→Introduction) |
|||
| Line 74: | Line 74: | ||
==== Introduction ==== | ==== Introduction ==== | ||
GenPlay can also be launched using a file. It consists in writing the exact same command line in a file and save it with the right extension. | GenPlay can also be launched using a file. It consists in writing the exact same command line in a file and save it with the right extension. | ||
| + | |||
| + | If you want to save the file in any other folder, you will have to give the full path of the jar file (not showed in examples). | ||
Why using a file? Because it will avoid you to write the command line every time! You will save time and avoid error because of typos. | Why using a file? Because it will avoid you to write the command line every time! You will save time and avoid error because of typos. | ||
Revision as of 16:19, 6 August 2012
Contents
Introduction
GenPlay can be launched from the Web Start web page or downloaded as a jar file.
There are two different ways to launch a jar file:
- Double click: it is the easiest way but the user does not control how the application starts.
- Command Line: Java parameters can be used and the user can precise how the application has to start.
This tutorial focuses on how to launch a GenPlay jar file using the command line method. It also explains how to allocate memory to GenPlay.
Requirements
Install Java
Java has to be installed on the computer you want to run GenPlay.
The latest version of Java is available here.
If more information is required, here is the official tutorial "How do I install Java ?".
Get a GenPlay jar file
All GenPlay jar files are available at the Versions page of the website. In this tutorial, the jar file is named "GenPlay.jar" and saved in a folder named "GenPlay".
The command line
Introduction
Open a terminal (see below how to do according to your operating system) and go to the folder "GenPlay".
The following command allows you to start GenPlay:
- java -jar GenPlay.jar
If the Operating System does not find the "java" variable, this tutorial will help.
The Xmx parameter
The Xmx parameter defines the maximum heap size of the Java Virtual Machine (JVM). In other terms, it defines the maximum amount of memory the java instance can use. Here are two examples:
- java -jar –Xmx512m GenPlay.jar
- java -jar –Xmx2g GenPlay.jar
The first command means that GenPlay will use up to 512Mb of memory (if needed).
The second command means that GenPlay will use up to 2Gb of memory (if needed).
Note: it is considered that Operating Systems use about 1Gb of memory. If the computer you are running GenPlay has XGb of memory, it is not advised to give more than (X-1)Gb to any Java application. If many other applications are running at the meantime, allowing too much memory to a Java application may seriously slow down your system.
Launching GenPlay
Through the console
Windows
In order to type a command line, the Windows Command Prompt must be open.
In Windows 7/Vista, go to the "Start Menu" (Windows button on the bottom left of the screen) and search for "cmd" before pressing the "Enter" button.
In Windows XP, go to the "Start Menu" (Windows button on the bottom left of the screen), click "Run", type "cmd" and click "OK".
Here is how the command lines look like:
Linux
Here is how the command lines look like:
Through a file
Introduction
GenPlay can also be launched using a file. It consists in writing the exact same command line in a file and save it with the right extension.
If you want to save the file in any other folder, you will have to give the full path of the jar file (not showed in examples).
Why using a file? Because it will avoid you to write the command line every time! You will save time and avoid error because of typos.
Windows
In Windows, you need to save the file as ".bat" file.
Then just double-click to launch GenPlay.
Linux
In Linux, you need to save the file as ".sh" file.
You can run it using the "sh" command from the console or double-clicking on it from your file browser (you may have to change the execution permission).