/usr/share/nexus/doc/java/README.JNEXUS is in libnexus0-java 4.3.2-svn1921-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | JNEXUS
This is the README file for the NeXus API for Java, Version 2.0.
This version supports both HDF-4 and HDF-5.
The NeXus API for Java (JAPI) is implemented by a class NexusFile
which calls the C-language NeXus-API through the Java Native
Methods Interface (JNI). For more documentation see the API
documentation in the directory apidoc and the class TestJapi.java
in directory test which not only serves as a test driver for
the JAPI but also as a code example for the usage of the NexusFile
methods.
ACKNOWLEGDEMENT
This library uses a lot of code taken from the Java HDF Interface
libraries provided by the NCSA-HDF team. Essentially all the number
conversion code is taken from there. Also, the JHI served as a
valuable source for inspiration during the devlopment of this
library. Please see the file COPYING.NCSA for more details. See
JHI version from which the code was extracted was JHI-2.5 as
downloaded in October 2000.
USAGE
I hope you downloaded a binary distribution of the JAPI. Due to the
complexity of this code we strive to provide binary distributions
for most platforms. If yours is not supported (we cannot have
samples of any computer system in the world) compilation instructions
can be found below.
As the JAPI uses native methods your Java runtime needs to locate the
shared library implementing the NAPI. Otherwise you will get an
Unsatisfied Link Error. There are three possibilities how the Java
runtime can locate the shared library:
- You or your system administrator puts the shared library into the
systems default location for shared libraries. On Windows
platforms this is any directory on the PATH, on a Unix system it
is usually something like /usr/shlib.
- You put it wherever you want on your unix system and set the
environment variable LD_LIBRARY_PATH to point to that directory.
More info on this in the manpages of your systems loader.
- You explicitly tell the Java Runtime where the shared library is
through the -Dorg.nexusformat.JNEXUSLIB=full-path-to-library
option.
Furthermore you need to include the jnexus.jar file in your Java
classpath both for compiling and running Java programs using the
JAPI.
As an example, see the runtestxx scripts supplied in the test
directory for running the test driver.
COMPILING
Is fairly easy on a Unix system. Use one of the supplied Makefiles
(Makefile dor DigitalUnix4.0D or, Make.tux for Redhat Linux 6.2)
and adapt the settings of the variables in the configuration
section to the state of your system. You need to know:
- Where you Java binaries, include files, libraries reside.
- Where the HDF4.1r3 libraries are installed.
- Furthermore adapt some compiler options in order to reflect the
way how your compiler builds shared libraries.
AUTHOR and Target for Comments:
Mark Koennecke
Laboratory for Neutron Scattering
Paul Scherrer Institut
CH-5232 Villigen-PSI
Switzerland
Mark.Koennecke@psi.ch
|