To use the toolkit, an appropriate version of Java Development Kit must be installed.
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:
depends.exe
from http://www.dependencywalker.com/ or Dependencies program from https://github.com/lucasg/Dependencies msparserj.dll
in the program. MSVCR140.dll
and MSVCP140.dll
are missing, download the Visual C++ 2015 (or later) redistributable package from the Microsoft Download Center: https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0 vc_redist.x64.exe
for 64-bit To use Mascot Parser, both msparserj.dll
and msparser.jar
must be accessible by your program.
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); } }
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.
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.
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); } }
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.
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
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
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
Reasonable proficiency in Java programming will be required. Please see Quickstart: how to open a results file and Examples for the results file module.