Matrix Science header

Java toolkit installation
[Installing Mascot Parser]

To use the toolkit, an appropriate version of Java Development Kit must be installed.

Installation on Windows

Mascot Parser Java toolkit has been tested with Oracle/Sun JDK versions 1.6.0_31 (Java SE 6) and 1.7.0_3 (Java SE 7). The Java Development Kit for Windows is available for download from http://www.oracle.com/technetwork/java/javase/downloads/.

You may also need to install the Microsoft Visual C++ 2012 Update 3 (or later) Redistributable Package
To check if you need this:

  1. Download and run depends.exe from http://www.dependencywalker.com/ or Dependencies program from https://github.com/lucasg/Dependencies
  2. Open msparserj.dll in the program.
  3. If depends.exe reports that the dependent MSVCR110.dll and MSVCP110.dll are missing, download the Visual C++ 2012 Update 3 (or later) redistributable package from the Microsoft Download Center: https://www.microsoft.com/en-us/download/details.aspx?id=30679
  4. Choose vcredist_x86.EXE for 32-bit and vcredist_x64.EXE for 64-bit

To use Mascot Parser, both msparserj.dll and msparser.jar must be accessible by your program.

msparserj.dll must be visible on the PATH

Either put msparserj.dll in your program directory or modify the PATH environment variable to include the directory where msparserj.dll is located.

Alternatively, the location of msparserj.dll can be specified explicitly in your program. To do this, instead of using the System.loadLibrary() method used in the examples, call the System.load() method. For example,

    static {
        try {
            System.load("C:/temp/parser/msparserj.dll");
        } catch (UnsatisfiedLinkError e) {
            System.err.println("Native code library failed to load. " + e);
            e.printStackTrace();
            System.exit(1);
        }
    }

msparser.jar must be present on your Java Classpath

You can either define the classpath when running java.exe or javac.exe by specifying the -classpath option, or modify the CLASSPATH environment variable. We recommend that you place the msparser.jar archive in a readily accessible location and define the classpath on the command line to include msparser.jar as required.

Installation on Unix platforms

Mascot Parser Java toolkit has been tested with Oracle/Sun JDK version 1.6.0_45 (Java SE 6). The Java Development Kit is available for download from http://www.oracle.com/technetwork/java/javase/downloads/. The Mascot Parser Java toolkit should also be compatible with OpenJDK, which can be installed from the package repository of most recent Linux distributions. The Mascot Parser Java toolkit requires glibc-2.5 or later and libstdc++-6.0.8 or later.

To use Mascot Parser, both libmsparserj.so and msparser.jar must be accessible by your program.

libmsparserj.so must be visible on LD_LIBRARY_PATH

You have two choices: either put libmsparserj.so in your program directory or put it in some other readily accessible location. In the first case, you need to add the working directory (.) to LD_LIBRARY_PATH; in the second, the full path to the directory where libmsparserj.so resides.

Modifying LD_LIBRARY_PATH can be done under bash and sh as follows:

    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/some/path"; export LD_LIBRARY_PATH

Note that this change is temporary. Consult your operating system manual how to make the change permanent.

Alternatively, the location of libmsparserj.so can be specified explicitly in your program. To do this, instead of using the System.loadLibrary() method used in the examples, call the System.load() method. For example:

    static {
        try {
            System.load("/tmp/parser/libmsparserj.so");
        } catch (UnsatisfiedLinkError e) {
            System.err.println("Native code library failed to load. " + e);
            e.printStackTrace();
            System.exit(1);
        }
    }

msparser.jar must be present on your Java Classpath

You can either define the classpath when running java or javac by specifying the -classpath option, or modify the CLASSPATH environment variable We recommend that you place the msparser.jar archive in a readily accessible location and define the classpath on the command line to include msparser.jar as required.

Building and running the Java examples in Windows

Open a command prompt, and change to the example_java directory.

To compile (for example) resfile_params.java:

    javac -classpath .;../java/msparser.jar resfile_params.java

To run the example:

    java -classpath .;../java/msparser.jar resfile_params F981123.dat

Building and running the Java examples in Unix

Open a terminal window, and change to the example_java directory.

To compile (for example) resfile_params.java:

    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../java" javac -classpath .:../java/msparser.jar resfile_params.java
Note:
This command temporarily sets LD_LIBRARY_PATH to include the java directory, where libmsparserj.so resides.

To run the example:

    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../java" java -classpath .:../java/msparser.jar resfile_params F981123.dat

Using the Java toolkit

Reasonable proficiency in Java programming will be required. Please see Quickstart: how to open a results file and Examples for the results file module.


Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:30