GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Wednesday, December 22, 2010

First Script In Jython

To get Jython, please download it from Jython web site. After you download, you need to install it by command:
C:\java -jar jython_installer.2.2.1.jar
After the installation completes, please move to jython\bin directory and run jython.bat
C:\jython\bin\jython.bat

>>> print "Hello, Jython"
Hello, Jython

>>> from java.util import Vector
>>> v = Vector()
>>> dir(v)
>>> v.add('larry page')
>>> v.add('barack obama')
>>> v.add('bill gates')
>>> for value in v:
>>>     print v
larry page
barack obama
Publish Post

bill gates
         
Share/Bookmark

No comments:

Post a Comment