uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: PEAR metadata/setenv.txt - do env. vars get set automatically?
Date Wed, 29 Oct 2008 16:04:53 GMT
There seem to be 2 separate issues here.

Issue # 1: incompatible Java class file version levels. Even if you
specify in the Pear descriptor, using the


that you are using java 1.4, this specification is not used to compile
your java sources to class files. Instead, whatever development process
you have and use to compile your source code is what determines the
version of the class files. Since you are using Eclipse, this is
controlled by the project settings in Eclipse. You can have the Eclipse
compiler generate java 1.5 level files by specifying this in the
project's properties -> Java Compiler and then setting the Generated
.class files compatibility to 1.5.

If you use another build system to compile your Java sources -> class
files (such as Maven), please refer to the documentation of the
particular build system for how to set the Java class file compatibility

Issue # 2: setting of environment variables.

The Pear installer code generates a file, manifest/setenv.txt, which is
a "convenience" file, which lists the environmental variables (other
than CLASSPATH and PATH) in the form of name=value lines. But UIMA does
nothing further with this file.

Java cannot set environmental variables, as far as I understand..

The PEAR wrapper Java code, instead, takes the name-values for
environmental settings specified in the PEAR descriptor and makes them
into Java "System"properties. Java code can access these values using
the Java System class.

If you have other non-Java code that needs to access these values, then,
outside of UIMA, you would need to set up the environmental variables,
in a manner that was Operating System specific (different for Linux and
Windows, for instance).

If you have Java code that is trying to read the environment variables,
if you are using System.getenv(name) method, then change this to
System.getProperty(name) - it will then pick up what the PearWrapper
code specifies (this assumes you are running a PEAR inside an aggregate
using the PEAR wrapper mechanism - see
The UCR repository code might do something with the environmental
variable information from the PEAR prior to doing any install or running
of the PEAR - Eric - can you say if it does?


View raw message