Difference between revisions of "How to launch a GenPlay jar file"

From GenPlay, Einstein Genome Analyzer

Jump to: navigation, search
(Install Java)
(Install Java)
Line 37: Line 37:
 
'''Java security'''
 
'''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 certification agency because GenPlay is a free open-source software and we cannot afford the cost of the security certification.  
+
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 run GenPlay you must lower the Java security settings or add the GenPlay website in the list of exception sites.
  

Revision as of 15:19, 24 June 2014

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 ?".

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.

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 and controlling the amount of memory for Windows computers

Download the jar file and save it to a folder named (for instance) GenPlay_Launch in your C: directory

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

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

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.

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".

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:

Win genplay.png

Win genplay 512m.png

Win genplay 2g.png

Linux

Here is how the command lines look like:

Linux genplay.png

Linux genplay 512m.png

Linux genplay 2g.png


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).