I am brand new to jython/python.
 
 I want to use my own Java class from within a Jython script.
 
 In Java, I created a class called Fubar and put this in a jar file called 
testit.jar.
 The Fubar class is in the just.for.fun package and this path shows up in the
 testit.jar file. I then modified the jython.bat file (I'm using windows) to 
include
 the testit.jar file in the classpath. When jython starts from the command line,
 it notices testit.jar and generates some cache information.
 
 Next I want to use the Fubar class in a jython script. I start jython from the 
command line and type:
 
 from just.for.fun import Fubar
 This doesn't work. The following error is displayed:
 ImportError: No module named for
 
 I also try
 
 import just.for.fun.Fubar
 
 This gives the same error.
 
 I can enter import java.util.HashMap and other such imports and these work. 
 
 Can someone please tell me what I could be doing wrong ?
 
 Thanks,
 
 
 
  
________________________________________________________________________
Check out the new AOL.  Most comprehensive set of free safety and security 
tools, free access to millions of high-quality videos from across the web, free 
AOL Mail and more.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to