jython problem
Russo, Tom
tom at studentuniverse.com
Wed May 22 18:18:31 EDT 2002
Hi Mark,
>
> I am having a problem using java jars.
>
you may have more luck posting to the jython-specific list:
Jython-users mailing list
Jython-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
_t
> The example is for jakarta-poi-1.5.0-FINAL-20020506.jar
>
> 1. I renamed jakarta-poi-1.5.0-FINAL-20020506.jar to poi.jar.
>
> 2. I modified registry, python path:
>
> python.path = .;g:\\poi\\build\\poi.jar\\org\\apache\\poi
>
> as per warning during installation.
>
> 3. Run Jython, and see what happens:
>
> C:\>jython
> Jython 2.1 on java1.3.1 (JIT: null)
> Type "copyright", "credits" or "license" for more information.
> >>> import org.apache.poi as poi
> >>> dir(poi)
> ['__name__', 'dev', 'hpsf', 'hssf', 'poifs', 'util']
> >>> dir(poi.hssf)
> ['__name__', 'dev', 'eventmodel', 'model', 'record',
> 'usermodel', 'util']
> >>> dir(poi.hssf.usermodel)
> ['HSSFCell', 'HSSFCellStyle', 'HSSFColorConstants', 'HSSFDataFormat',
> 'HSSFDateUtil', 'HSSFErrorConstants', 'HSSFFont', 'HSSFRow',
> 'HSSFSheet', 'HSSFWorkbook',
> '__name__']
> >>> x=poi.hssf.usermodel.HSSFWorkbook()
> Traceback (innermost last):
> File "<console>", line 1, in ?
> AttributeError: java package 'org.apache.poi.hssf.usermodel' has no
> attribute 'HSSFWorkbook'
> >>>
>
>
> Why is this failing? Is there any way to fix it? I have encountered
> the same problem with other jars.
>
> If I import jdk standard libs, everything works fine.
>
> ??
>
> thx
>
> Mark
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list