From: Phil S. <psu...@es...> - 2001-12-21 16:17:19
|
I submitted a patch to support this to jython-dev a while back. [I said] After poking through the jython code, I found that this patch to org/jython/core/imp.java in jython-2.1a3 does the trick: imp.java 498a499,502 > //if it's not a builtin or in the python path, try the classpath > ret = loadFromClassLoader(name, imp.class.getClassLoader()); > if (ret != null) return ret; > to put this into context: private static PyObject load(String name, PyList path) { PyObject ret = loadBuiltin(name, path); if (ret != null) return ret; ret = loadFromPath(name, path); if (ret != null) return ret; > //if it's not a builtin or in the python path, try the classpath > ret = loadFromClassLoader(name, imp.class.getClassLoader()); > if (ret != null) return ret; > -----Original Message----- From: Duane [mailto:dpk...@ur...] Sent: Monday, December 17, 2001 5:04 PM To: jyt...@li... Subject: [Jython-users] Using Jython with Java Web Start I'd like to jar up my py files (or *$py.class files) into one jar and jump into my application with Java Web Start. With Java Web start, you can only specify jar files, not py files. I cannot use the python.path since Web Start renames the jar files and puts them in an unknown location. Is there a way to make jython get the py files using Class.getResource() instead of looking locally for a file? That could be usefull for standard applications as well. |