|
From: Sarwar R. <raz...@ya...> - 2001-02-19 15:18:12
|
I was able to fix my problem using Jaroslav's registry
file fix. Thanks!
I am trying desparately to NOT have to specify jarfile
locations in my classpath (i.e. in my autoexec.bat or
.login file). I'd rather supply them as command line
args.
say, I heard a while back that O Rieley was doing a
vol. on JPython? Whatever became of that? any
references for a good tutorial online?
Thanks
-Sarwar Raza
--- Finn Bock <bc...@wo...> wrote:
> [Sarwar Raza]
>
> >Hi..
> >I posted a similar problem a few days ago. I have
> >tried adding the application specific jars to my
> >classpath (referring to the jars themselves and not
> >just their directories) but the jpyton interpreter
> >_will not_ pick them up.
>
> Strange, it works fine for me. Note that the name of
> the .jar files
> added to CLASSPATH envvar must be with lowercase
> ".jar".
>
> F.ex my classpath looks like this:
>
>
CLASSPATH=i:\java\jdk1.3\jre\lib\rt.jar;i:\java\Jython.CVS\jython.jar;i:\java\in
>
fobus1.2\infobus.jar;I:\java\jaxp1.0.1\jaxp.jar;i:\java\jaxp1.0.1\parser.jar;i:\
> java\jakarta-tomcat-4.0-m5\bin\servlet.jar
>
> and the classes in all the .jars listed can be
> loaded as expected.
>
> >The only jars cached by the
> >package manager are those in the ..JRE/lib/ext
> >directory. This is a serious problem for me. Any
> help
> >would be much appreciated.
> >
> >Some additional detail:
> >the jpython modules are run within a jpython
> >interpreter embedded within the application. i.e.
> >there is no CLI.
>
> Can you load the classes from a command prompt? Does
> the application set
> its own classpath when starting and thus ignoring
> the CLASSPATH envvar?
>
> >I create a jpython interpreter object
> >and pass it the name of the module to run. If any
> of
> >these modules contain and 'import from' clause for
> a
> >package from a jar _not_ contained witin
> >../JRE/lib/ext, the package manager _will not_ pick
> >them up. I can go crazy importing
> java.util.Hashtable
> >or javax.util.Timer for example, but cannot import
> >from com.foo.bar unless foobar.jar is in
> >../JRE/lib/ext. I need to change this so that I can
> >load libs from a custom directory.
>
> As a workaround you can add the packages to the
> package cache by doing a
>
> sys.add_package("com.foo.bar")
>
> from within the python module before doing
>
> from com.foo.bar import Baz
>
> regards,
> finn
>
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
>
http://lists.sourceforge.net/lists/listinfo/jython-users
=====
*************************
Sarwar S Raza
NMS Software Engineer
CommWorks Corporation
http://www.wpi.edu/~sraza
*************************
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
|