From: John M. <joh...@ya...> - 2001-04-05 16:17:37
|
Reading the doc helps... The following is from http://www.jython.org/docs/registry.html#finding All I had to do was add jython.jar to the CLASSPATH even though jython.jar is not there. It tricks jython into going to the same directory to read the registry file. It works. ------ Finding the Registry File The following steps are used to find the Jython registry file, and also to set the Python values for sys.prefix. First a root directory is calculated: If there is a property called python.home, this is used as the root directory. Otherwise, the property install.root is used if it exists. If neither of those properties exist, then Jython searches for the file "jython.jar" on the Java classpath, as defined in the system property java.class.path. The actual file system isn't searched, only the paths defined on the classpath (one of them must literally include "jython.jar"). Once the root directory is found, sys.prefix and sys.exec_prefix are set to this, and sys.path has rootdir/Lib appended to it. The registry file used is then rootdir/registry. --- John Mudd <joh...@ya...> wrote: > I have a clue!! > > The error below is apparently because the member that I'm trying to > inherit is protected. My script version works because I have set > "python.security.respectJavaAccessibility = false" in my registry > file. > But my jar version fails even when I copy the registry file to the > same directory as the jar file. Any suggestions? > > > --- John Mudd <joh...@ya...> wrote: > > My previous message said that my jar worked w/o jython.jar. That > was > > my mistake. I didn't test it far enough. I still need jython.jar > > to > > avoid the following error at run time. > > > > > > --- John Mudd <joh...@ya...> wrote: > > > I switched to the latest jython but I still get an error when > > trying > > > to > > > run a jythonc generated jar file unless I put the jython.jar in > the > > > CLASSPATH. I used the "--all" option when running jythonc. Any > > > suggestions. > > > > > > In this case yyy is a valid attribute for a super class that was > > > inherited by xxx. This works when run as a jython script. It > only > > > works as a jythonc jar file if I put jython.jar in the CLASSPATH. > > > > > > AttributeError: instance of 'xxx' has no attribute 'yyy' > > > > > > > > > > > > > > > $ jython > > > Jython 2.1a1 on javaVM-1.3.0.01 (JIT: null) > > > Type "copyright", "credits" or "license" for more information. > > > >>> > > > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Get email at your own domain with Yahoo! Mail. > > > http://personal.mail.yahoo.com/ > > > > > > _______________________________________________ > > > Jython-users mailing list > > > Jyt...@li... > > > http://lists.sourceforge.net/lists/listinfo/jython-users > > > > > > __________________________________________________ > > Do You Yahoo!? > > Get email at your own domain with Yahoo! Mail. > > http://personal.mail.yahoo.com/ > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > http://lists.sourceforge.net/lists/listinfo/jython-users > > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |