[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Java binaries: CLASSPATH, -classpath, -cp?


I found that JPython now finally works with the recent kaffe version,
therefore I thought I should try to finish the package according to
the Java Policy draft. I ran into several problems, and thought I
might ask for help ;-)

JPython comes as jpython.jar, with a few other utility files that
should go in proper places as well (a configuration file `registry', a 
few Python files in a directory Lib, a few tools). JPython is started
from a simple shell script, jpython, that by default looks like this
(obviously the installer noticed that for me /usr/bin/java = kaffe):

  # This file generated by JPython installer
  # Created on Tue Aug 17 13:19:51 GMT+0:00 1999 by flight
  exec /usr/bin/jre \
    -Dpython.home=/home/flight/work/deb/jpython/jpython-1.099beta2 \
    -classpath \
  /usr/share/kaffe/tools.jar:/usr/share/kaffe/microsoft.jar" \
  org.python.util.jpython "$@"

Now if I'd like to make this script indepedent of the
java-virtual-machine, what do I have to do ?

AFAICS, the only solution at this point is to unzip jpython.jar into
the Java repository at /usr/share/java/repository, and then use
something like 

  exec /usr/bin/java-vm \
      -Dpython.home=/usr/share/jpython org.python.util.jpython "$@"'

(or is it better to use /usr/bin/java ?).

I thought a better solution was to install the jar file in
/usr/share/java and use something like

  exec /usr/bin/jre -cp /usr/share/java/jpython.jar \
      -Dpython.home=/usr/share/jpython org.python.util.jpython "$@"'

to augment the classpath, but for some reason, kaffe doesn't have a
jre, i.e. doesn't support the -cp option, so this won't be portable
(why doesn't kaffe have jre ???).

Any hints ?


Reply to: