This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java compatible problems with jython

 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey,

i wrote an ant task, which i want to include. but there are problems with java, which cannot find the methods i set.

following jython-script HibernateTask.py:


method is execute is not recognized by java clients. following line does not compile, it accepts instantiation of HibernateTask but gives name resolved error with call to execute:


my compiling commands:
$ jython.c bat -a -d -c -j task.jar HibernateTask.py
$ javac -classpath 'task.jar;.' Main.java

i am using jython 2.1 on java 1.4.2_12

another question: the last release of jython is mid 2005, has its development been stopped?

thnx a lot!
[ June 06, 2006: Message edited by: manuel aldana ]
 
Josh Juneau
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry it took me so long to respond to this question. You need to subclass a Java class or interface.

Read this article: http://wiki.python.org/jython/JythonMonthly/Articles/July2006/1

- Josh
 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

import org.apache....

class HibernateTask(Task):

def execute(self):
"@sig public void execute()"
print "task started"


i am subclassing Task (from ant), therefore i am indirectly subclassing Object. so that should not be the problem.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by manuel aldana:
another question: the last release of jython is mid 2005, has its development been stopped?

It's development has been lacking in visible progress but it hasn't stopped. You can follow the events through the jython-dev list, for example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic