Using Java classes with javaclass_0.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • flyguy
    New Member
    • May 2010
    • 1

    #1

    Using Java classes with javaclass_0.1

    I am trying to use javaclass

    http://www.boddie.org. uk/python/javaclass.html

    to be able to use supplied java methods in python. From here

    http://bytes.com/topic/python/answers/539213-parsing-java-files

    I got it working, and using the info on

    http://www.boddie.org. uk/python/javaclass.html

    and following instructions from the downloaded package that supplied the readme file, I did the following

    put the java class files in the python path, so they are visible,
    import javaclass.class hook
    import thejavaclassfil e

    The report I'm getting when doing this is

    AttributeError: 'list' object has no attribute 'endswith'

    Is there a version clash or something I missed?
    I am using Python 2.5.5 (r255:77872, Apr 21 2010, 08:44:16)
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    I don't think so. "endswith() " is a str method, and the error message tells you that an attempt was made to call this method on a list object. That's an error in your code or the code you are attempting to use.

    Comment

    Working...