From: SourceForge.net <no...@so...> - 2003-07-19 14:56:16
|
Bugs item #774219, was opened at 2003-07-19 23:56 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=774219&group_id=12867 Category: Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jane Austine (janeaustine50) Assigned to: Nobody/Anonymous (nobody) Summary: sys.path.append doesn't add .jar file properly Initial Comment: Jython 2.1 final on win XP. Jython 2.1 on java1.4.2-beta (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.append('junit.jar') >>> import junit >>> junit.framework <java package junit.framework at 13554088> >>> junit.framework.TestCase Traceback (innermost last): File "<console>", line 1, in ? AttributeError: java package 'junit.framework' has no attribute 'TestCase' >>> from junit.framework import * >>> junit.framework.TestCase <jclass junit.framework.TestCase at 22498184> >>> As you see the junit.framework.TestCase is not accessible simply by adding the jar file in the sys.path. You need to import the specific class in order to access it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=774219&group_id=12867 |