Java Basics

Java-programs require a Java Platform to run, the so-called "Java Virtual Machine" (JVM) or "Java Runtime Environment" (JRE) (Download). It is recommended to update to the newest Java version. You can have several Java-versions at the same time on your computer. The JRE provides the command "java" in the bin-dirctory which is used to run strap.jar.
      java -jar strap.jar
    
The command javaws of the Java system is used to start Java-Webstart-files ".jnlp". Java-Webstart is a launcher for Java-programs.
      javaws  http://www.bioinformatics.org/strap/strap.jnlp
    
The command "javaws" has 3 advantages over "java":
  1. The newest STRAP version is automatically downloaded.
  2. On some Windows computers it is not easy to download files with the ending ".jar". Java Web Start solves this problem.
  3. Some users are within an Intranet and reach the Internet with a proxy-server. If this is the case Java Web Start may be able to automatically obtain the proxy-settings from the Web-Browser.

Web-Browser settings

Files with the ending ".jnlp" should be processed with javaws. Web-Browser settings are usually found in the menus "Settings" or "Preferences". See Netscape or   Opera or   Step 1 firefox,   Step 2 firefox,   Step 3 firefox for how to associate javaws to the file type ".jnlp" in the web browser.

Demos

To test whether Java-Webstart is principally working on your computer try the .

In case of Problems

For huge amounts of protein data increase heap memory.

Increasing memory

Increasing memory: If you perform analyses with a large amount of data and you get an OutOfMemoryError you need to enlarge max-heap-size. In case you start STRAP with Webstart please download and modify the jnlp file. Then start the altered copy. If you start STRAP from the command line please use the option -Xmx256M to increase to 256Mb. Alternatively, you can increase memory in the Java control panel.


OS-specific

Windows Windows     Macintosh Mac Unix/Linux Linux    

Java control panel

The Java control panel is found in the Windows-Menu/Settings/Java. In the control panel the Web-proxy can be specified.

Installation without Administrator rights

If you are not a previledged user you can still install java. Before you start please agree to the terms of use of the JRE by the Sun. Unzip the file http://www.bioinformatics.org/strap/dataFiles/jre1.6.0.zip to your hard-disk or USB-stick. Then find the program \bin\javaws.exe in the extracted files. Tell your browser to use it for jnlp-files.

Starting Java programs from command-line

If starting STRAP with Javaws fails, it is worth trying to download and start strap.jar by double click. If this also fails try to start STRAP from the command-shell because this allows to observe possible error messages. For this purpose download strap.jar to the folder "C:\temp". You need to open a command-shell (MS-DOS-shell) by chosing "Run program" and typing "cmd".
        C:
        cd \temp
        java.exe -jar strap.jar
      
If it tells "java.exe: command not found" you must search for "java.exe" on your hard disk and enter the full path like:
C:\programs\jre1.6.0_02\bin\java.exe -jar strap.jar
Debian: Debian or Debian based systems like Ubuntu provide the Java package openjdk. Java can be installed with the following shell command:
        sudo apt-get install openjdk
      
Or it may be
        sudo apt-get install openjdk-6-jre
      
On all (other) Linux systems Java can be installed in the following way wheras no changes to the system are necessary and other existing Java installations are not touched. Administration previledges are not required: Download the self-extracting archive Java (16 Megabytes) and extract it on the hard disk or an USB-stick.
        mkdir /local/java
        sh path/jre-XXX-linux-i586.bin 
      
By running the installer the license conditions will be displayed. After extraction you will find three important executable files:
        /local/java/jreXXX/bin/java
        /local/java/jreXXX/bin/javaws
        /local/java/jreXXX/bin/ControlPanel
      
The command java is used to start jar-files with the ending ".jar". This requires the option -jar:
        
        /local/java/jreXXX/bin/java -jar strap.jar
      
The second command javaws is used to start Java-Webstart-files with the ending ".jnlp". Java-Webstart is a launcher for Java-programs which takes care that outdated files are automatically updated. Always the newest program version is started. The web browser must be told the complete path /local/java/jreXXX/bin/javaws.
        /local/java/jreXXX/bin/javaws  http://www.bioinformatics.org/strap/strap.jnlp
      
The following is to run applets in Firefox. It is not required for STRAP.
        ln -s  /local/java/jreXXX/plugin/i386/ns7/libjavaplugin_oji.so  ~/.mozilla/plugins/
      

Setting up the Browser

Usually, nothing needs to be set up. The web browser should process the file strap2.jnlp with the program javaws which is found in /Applications/utilities/java. Otherwise see Browser settings.

GUI in STRAP

Some short cuts are X-Windows like and not Mac-like, as they work with the CTRL instead of the command key. The right mouse button brings up a . CTRL+ALT simulates the right mouse button in case the mouse has only one button. Multiple selections: CTRL + Left-click or SHIFT + Left-click.

Compilers

The compilers for standard computer languages are usually not installed on Macintosh computers but can be installed from the system DVD by the user. The compilers (f77, c++ and cc) are part of the Xcode package. The advantage of having these compilers is that all embedded Bioinformatics programs in STRAP can be used. Only a minimal set of Bioinformatics programs in STRAP are precompiled for PPC. For Intel Macintosh computers, Bioinformatics programs installed from source code will run faster because an Intel specific executable is built instead of using the PPC version. After installing the compilers you should remove the entire directory
        rm -r ~/.StrapAlign/bin 
      
to force STRAP to install all external programs again.

STRAP is tested with Java version 1.5, 1.6 and 1.7 systems of Sun (Oracle) as well as of IBM. Back to STRAP