From: Todd M. <tm...@in...> - 2005-02-24 14:41:12
|
As a general policy I set both sys.path and my classpath environment variable on Win 2000. Both may not be necessary, but I've found it easier to be slightly over-cautious just so things work. Cheers, Todd Moyer Xavier Noria wrote: > On Feb 23, 2005, at 17:59, Xavier Noria wrote: > >> On Feb 23, 2005, at 17:39, Greg Knaddison wrote: >> >>> I don't really like the idea of downloading a jar from an unknown >>> source and running it on my computer, so I can't provide assistance to >>> your current question. >> >> >> Sure, I just included it in case you trusted it and didn't want to >> bother building it. > > > Maybe the test didn't make the actual question apparent. > > The real question is whether sys.path.append(jar) works on Windows XP. I > couldn't get ANY jar with Java packages working. For instance: > > C:\>jython > Jython 2.1 on java1.4.0_02 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> import sys, os > >>> sys.path.append(os.path.join(os.getcwd(), "jdom.jar")) > >>> from org.jdom import Element > Traceback (innermost last): > File "<console>", line 1, in ? > ImportError: cannot import name Element > > In case it gives some hint, if the classes in the jar live in the > default package they are found. I would be delightful to look at the > Jython sources to try to debug this, but first I would like to know > whether you agree this smells like a bug and it's not something I am > doing wrong. > > The issue is that some Windows users of some application I wrote > reported that the application launcher does not work (the launcher is a > portable Jython script that computes the classpath dynamically), and I > would like to be able to say "yes, this is a known bug, please try this > alternative .bat meanwhile". > > -- fxn > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&op=click > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |