JPython install question

Calvelo Daniel dcalvelo at pharion.univ-lille2.fr
Thu Sep 7 05:55:35 EDT 2000


Huaiyu Zhu <hzhu at users.sourceforge.net> wrote:
: I did got it install into /usr/local/lib/java/JPython-1.1 and put this in
: CLASSPATH.  I got jpython to produce a hello.class.  When running java
: hello, I got java.lang.NoClassDefFoundError: org/python/core/PyObject.

: Went back to /usr/local/lib/java/JPython-1.1/org/python/core/, and found 68
: .java files sitting there, without .class files.   I tried to compile a few of
: them but got errors.  Should there be .class files shipped with JPython?
: Or maybe I'm doing something silly.

Mmmmh. Let's do it step by step, I may have missed something on your question.
You just want to *install* JPython, don't you (I mean not make a custom 
version of it)?

I just grabbed JPython11.class. Then 'java JPython11'. The installer is
launched and asks for a directory. I say '~/JPython-1.1'. Installs ok.

Then:

<dcalvelo at llorio ~/JPython-1.1> ls -F
ACKNOWLEDGMENTS  NEWS       docs/        jpython*     registry
LICENSE.txt      Tools/     html/        jpython.jar  rules/
Lib/             cachedir/  install.idb  jpythonc*    uninstall.class
Makefile         demo/      installer/   org/         util/

Notice the 'jpython.jar' and the 'jpython' exe. Indeed:

<dcalvelo at llorio ~/JPython-1.1> cat jpython
#!/bin/sh
# This file generated by JPython installer
# Created on Thu Sep 07 10:51:55 GMT+0:00 2000 by dcalvelo
exec /usr/bin/java -Dpython.home=/home/dcalvelo/JPython-1.1 \
-classpath "/home/dcalvelo/JPython-1.1/jpython.jar:$CLASSPATH" \
 org.python.util.jpython "$@"

You have the sources in org/python/core, but they have already been compiled.

<dcalvelo at llorio ~/JPython-1.1> ./jpython
JPython 1.1 on java1.0.6 (JIT: kaffe.jit)
Copyright (C) 1997-1999 Corporation for National Research Initiatives
>>> 

Works like a charm. This is a Debian woody, but I had previous versions on
RedHat and Mandrake without any hassle.

HTH, DCA

-- Daniel Calvelo Aros
     calvelo at lifl.fr



More information about the Python-list mailing list