From: Alexey N. S. <A.S...@md...> - 2005-09-08 17:52:44
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"= > </head> <body bgcolor=3D"#ffffff" text=3D"#000000"> I had to write my own Jython launcher that understood -Mpath option to modify sys.path, but for jars you should be able to modify CLASSPATH environment variable.<br> <br> - Alexey.<br> <br> Berlin Brown wrote: <blockquote cite=3D"mid...@ma..." type=3D"cite">I am trying to add a jar that is in my current path.=C2=A0= It doesnt seem to work based on what I have been reading up on.<br> <br> This is what I have tried, it is commons httpclient by the way.<br> <br> sys.path.append('commons.jar')<br> <br> from thepackagename import TheClass<br> <br> I get an error:<br> <br> ImportError:<br> <br> ...<br> ...<br> I tried this:<br> <br> sys.add_package('thepackagename')<br> <br> and then I still tried to do the above.<br> <br> What am I missing?<br> <br> I have also tried the absolute path, still not working?<br> </blockquote> <br> <div class=3D"moz-signature">-- <br> <hr><i> Alexey N. Solofnenko<br> home: <a href=3D"http://trelony.cjb.net/" style=3D"text-decoration: none; color: inherit;">http://trelony.cjb.net/= </a><br> </i> </div> </body> </html> |