awips2/nativeLib/rary.cots.jepp/jepp-2.3
Nate Jensen 3a5198043e Issue #2476 delete local references of arguments to free up memory fast and free memory if someone decides to infinite loop in python
Change-Id: I944d16f506647b138d08c0a93c9b6164a9d55d6e

Former-commit-id: e42a5dfd39 [formerly 9bd504cc75] [formerly 1e620fde68] [formerly e42a5dfd39 [formerly 9bd504cc75] [formerly 1e620fde68] [formerly f08ee91f20 [formerly 1e620fde68 [formerly 016bcf45a28c1f99bee930a12d30a72beb9e4dd3]]]]
Former-commit-id: f08ee91f20
Former-commit-id: 2a7af1912a [formerly 129ac026e8] [formerly 064ee315791a4d2d63b0fa1245abf5579f5c4fa8 [formerly f88dd78056]]
Former-commit-id: 984738eec6d4092230acdaa461d9a6c879b40b9e [formerly da4bd4680c]
Former-commit-id: 07e7928cd9
2013-10-17 14:50:05 -05:00
..
ext Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
javadoc Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
src Issue #2476 delete local references of arguments to free up memory fast and free memory if someone decides to infinite loop in python 2013-10-17 14:50:05 -05:00
windows 13.1.2-2 baseline 2013-01-06 14:32:24 -06:00
acinclude.m4 Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
aclocal.m4 Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
AUTHORS Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
autogen.sh Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
ChangeLog Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
compile.py Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
config.guess Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
config.h.in Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
config.sub Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
configure Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
configure.in Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
console.py Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
COPYING Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
depcomp Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
INSTALL Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
install-sh Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
jep.1 Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
jep.lsm.in Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
jep.spec.in Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
LICENSE Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
ltmain.sh Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
Makefile Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
Makefile.am Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
Makefile.in Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
makejar.sh Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
memtest.py Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
missing Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
mkinstalldirs Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
NEWS Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
python.m4 Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
README Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
stamp-h.in Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
test.py Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
testbsf.py Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
testswing.py Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
texinfo.tex Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00
threadtest.py Initial revision of AWIPS2 11.9.0-7p5 2012-01-06 08:55:05 -06:00

	jepp - Java Embedded Python



   Copyright (c) 2004, 2005, 2006 Mike Johnson.

   This file is licenced under the the zlib/libpng License.

   This software is provided 'as-is', without any express or implied
   warranty. In no event will the authors be held liable for any
   damages arising from the use of this software.
   
   Permission is granted to anyone to use this software for any
   purpose, including commercial applications, and to alter it and
   redistribute it freely, subject to the following restrictions:
   
       1. The origin of this software must not be misrepresented; you
       must not claim that you wrote the original software. If you use
       this software in a product, an acknowledgment in the product
       documentation would be appreciated but is not required.
   
       2. Altered source versions must be plainly marked as such, and
       must not be misrepresented as being the original software.
   
       3. This notice may not be removed or altered from any source
       distribution.

Comments welcome.

	- Mike Johnson <mrjohnson0@users.sourceforge.net>


    DEPENDENCIES
        - Python version >= 2.2
        - JNI >= 1.2 (untested, preferably 1.4)


    BUILDING ON LINUX/UNIX
        Simply ./configure && make && make install.


    BUILDING ON MAC OS X
        You'll need to:
            - set JAVA_HOME to /Library/Java/Home *not* /usr.
            - compile Python or download it using Fink.
            - have installed the developer kits from Apple
            - make a symlink from libjep.dynlib to /Library/Java/Extentions, like:
                sudo ln -s `pwd`/.libs/libjep.dylib \
                    /Library/Java/Extensions/libjep.jnilib

                *** Make sure to use '.jnilib' for the symlink. ***

              (This will get added to the install script Very Soon Now.)


    AUTOMAKE 1.6
        If you're using automake > 1.4, please run the `autogen.sh`
script before running configure. This includes Mac OS X.

    
    WINDOWS
        You'll need MSVC 6 and Python 2.3. I've compiled successfully
against the ActiveState version. The project file expects Java in
C:\j2sdk1.4.2_04 and Python in C:\Python2.3. If these aren't correct
paths, you should edit the project settings.
        Otherwise, the build is pretty normal. Notice there's no debug
version. Feel free to add one if you like.
        Also, you'll likely need to add -Djava.library.path='path to
Release folder' for testing. Or copy and register the DLL in the
System directory.


    RUNNING ON *NIX - Preparing the libraries

        Due to some (common) difficulties with Java and C projects
that dlopen libraries, you'll need to set LD_PRELOAD environment
variable. That's in addition to setting LD_LIBRARY_PATH if you've
installed libjep into a directory not cached by ld.so.
        For example, my tomcat startup.sh script starts with this:

            #!/bin/sh
            # java memory setting
            export JAVA_OPTS='-Xmx64m'

            # force system to load python
            export LD_PRELOAD=/usr/lib/libpython2.3.so.1.0

            # this is where my libjep.so is.
            export LD_LIBRARY_PATH=/share/jepp/jep/.libs

        Adding some heap memory is a good idea, too.
        The libpython used here is whatever you've compiled jep
against. If you don't know, try this command:

            $ ldd .libs/libjep.so.1.0.0
                < ... blah ... >
            	libpython2.3.so.1.0 => /usr/lib/libpython2.3.so.1.0 (0x40023000)

        That's the libpython you want to set in
LD_PRELOAD. Unfortunately, this means you'll have to change this if
you upgrade python. If it's the wrong library, it will most likely
cause a crash. If it's not set you'll get an exception similar to:
"Python Encountered: exceptions.ImportError:
/usr/lib/python2.3/lib-dynload/datetime.so: undefined symbol:
PyObject_GenericGetAttr".


    RUNNING - Down to business

        First, fire off the test.py script. We want to make sure
you're fully setup. To start with, export LD_LIBRARY_PATH and
LD_PRELOAD as in the section above. Then, start with:

            java -classpath ../ jep.Test 0

        A lot of early bugs in Jep didn't appear until the code is
stressed a little. The above 0 argument is the number of additional
threads to create. They all run through the test.py script in sub
intepreters. Go ahead, throw some threads at it.

            $ time java -classpath ../ jep.Test 3
                real	0m0.344s
                user	0m0.260s
                sys	0m0.050s

            $ time java -classpath ../ jep.Test 50
                real	0m1.944s
                user	0m1.850s
                sys	0m0.100s

        The test script isn't designed for speed but it runs quickly
enough.