0

I have been trying to use eclipse as a jython ide. Currently I have been working with a program that has a script editor inside the program(uses jython), but the script must be run in its entirety each time, it is not 'interactive'. There is a large api associated with it and I want to use eclipse to have an interactive console. I cannot import the modules/jar/classes.

I have tried to append the folder containing the jar files to the sys path seen here, I have exploded the jar files and added those files (which have the class files in them) to the sys path seen here. I have added the jar files and class files to the classpath and the user libraries under eclipse>windows>preferences>java>Build Path

Currently I can import without error, I can seemingly construct a class without error, but nothing happens.

An example of what my console looks like is

from myFile import myClass

>>>myObj = myClass.open(fileName)
>>>myObj
>>>type(myObj)
>>>myObj.__class__
>>>type('string')
<type 'str'>
>>>'string'.__class__
<type 'str'>

when I try to create an instance of my class it doesn't throw an error, but it doesn't do anything either. Yet other objects appear to work.

Any insight is appreciated

Community
  • 1
  • 1
Jeff Tilton
  • 1,256
  • 1
  • 14
  • 28

1 Answers1

0

I use at my project at the moment the jython-standalone.jar on a Windows 7 machine and also using a Java Modul. I used 7 Zip Manager(because unzipping and adding my jar via the normal zip causes errors) to get acces to the standalone.jar(but it should also work with the normal jython.jar) and add my module via drag&drop into the folder "Lib".

If you're using another OS system try something similar.

Since then I haven't got any problems with importing my java modules so far.

zonk
  • 147
  • 14