How to launch a GenPlay jar file
From GenPlay, Einstein Genome Analyzer
- 1 Introduction
- 2 Requirements
- 3 Launch GenPlay using the Java WebStart technology
- 4 Launch GenPlay from a downloaded jar file
Even though we recommend to fully install GenPlay using the link from the Downloads page, GenPlay can also be launched directly using Java technologies. There are two main advantages:
1 - GenPlay doesn't need to be installed
2 - The memory amount allocated to GenPlay can be easily adjusted
This tutorial explain how to launch GenPlay using two different methods:
1 - Using the Java technology called WebStart
2 - Downloading the Jar file and launching using a command line or creating a start up file
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 ?".
Launch GenPlay using the Java WebStart technology
The Java WebStart is the easiest method to run GenPlay. From the Downloads page, scroll to the bottom of the page, select the version of GenPlay you want to use, set the memory you want to allocate to the software and then click on the "Launch" button.
Note about Java on Windows
After pressing the Launch button your browser will generally ask which application to use to Launch GenPlay.
On most Windows computers there are two versions of Java installed, a 32-bits and a 64 bits version. We strongly recommend that you use the 64-bit version to run GenPlay because the 32-bit version is limited to 1.4Gb of RAM
To launch GenPlay you must point your browser to the appropriate version of Java
Java 64-bits is installed by default in the C:\Program Files\Java\jre7\bin directory
Your browser should be pointed to file javaws.exe in directory C:\Program Files\Java\jre7\bin (If you have java 6 installed the javaws.exe file is located in C:\Program Files\Java\jre6\bin
Java 32-bit is installed by default in the C:\Program Files (x86)\Java\jre7\bin directory Your browser should be pointed to file javaws.exe in directory C:\Program Files (x86)\Java\jre7\bin (If you have java 6 installed the javaws.exe file is located in C:\Program Files (x86)\Java\jre6\bin
If you use Java 32-bit, the maximum amount of memory you can set is about 1.4 Gb. Higher amounts of memory might cause Java to crash.
Note about Java security
Since version 7 Java has augmented its security settings to prevent unsigned, uncertified software to run. GenPlay is self-signed but has not been registered to one of the major trusted Certificate Authority because GenPlay is a free open-source software and we cannot afford the cost of the security certification. To run GenPlay you must lower the Java security settings or add the GenPlay website in the list of exception sites.
To lower the Java security settings navigate to the control panel and launch the Java applet. navigate to the security tab and lower the security setting to medium.
To add GenPlay to the list of exception site, navigate to the control panel and launch the Java applet. Navigate to the security tab, click on edit site list and add http://genplay.einstein.yu.edu to the list of site. click enter.
Launch GenPlay from a downloaded jar file
Get a GenPlay jar file
All GenPlay jar files are available from the Downloads page of the website. In this tutorial, the jar file is named "GenPlay.jar" and saved in a folder named "GenPlay".
Note: When saving the file in Notepad change the file type as "all files" to make sure that the file you created ends in .bat. I f you save it as a txt file, the file will be named .bat.txt and will not be recognized as a .bat file and GenPlay will not launch.
The command line
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.
Through the console
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:
Here is how the command lines look like:
Through a file
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.
In Windows, you need to save the file as ".bat" file.
Then just double-click to launch GenPlay.
Here is an example on how to start GenPlay from a file on Windows computers:
1. Download the jar file and save it to a folder named (for instance) GenPlay_Launch in your C: directory
2. Open Notepad and create a file containing the following line:
"C:\Program Files\Java\jre7\bin\java.exe" -Xmx8g -jar "C:\GenPlay_Launch\GenPlay_v1.0.14.jar"
Save the file with the name GenPlay_v1.0.14.bat in the folder
3. Navigate to the GenPlay_Launch folder and click on the GenPlay_v1.0.14.bat file.
This will launch GenPlay with 8 Gb of memory.
The amount of memory used by GenPlay can be changed by editing the bat file. changing the line to -Xmx12g will launch GenPlay with 12Gb of memory
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).