logo       

Re: using someone elses' jar file: msg#00058

lang.jython.user

Subject: Re: using someone elses' jar file

Don't import *. Either list the classes you want explicitly,
or just import the package and use the package to qualify the
class names.


ytcm47-jythonuserslist@xxxxxxxxx wrote:
I am attempting to use JFreeChart.
My source file is named "test1". test1 works fine until I add the following line:
from JFreeChart.jfree.chart.ChartFactory import * The path above is to the ChartFactory.java file that resides beneath my <classpath> as determined by sys.path. It resides in: <classpath>\JFreeChart\jfree\chart
Jython responds with: ImportError: cannot import name test1
How should an external file be referenced so that it can be used in jython?
[Note: I attempted to understand pathing by searching for "javax" but none of the instances I found on my harddrive were in my "sys.path". So, now I am really confused. I figured that if I could figure out how it is that I can access javax.swing, etc., that I could model my call to jreechart the same way. But I can't figure that out yet either.)
Can someone please help me understand how all of this works so that I can then successfully use other jar files?
Thank you




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise