how to compile in jython 2.5b1??

P

pellegrinodj

I have to use jython 2.5b1 couse with the stable version it's not
possible to use sympy library for mathematic operation but the
"jythonc.bat" it's not included.
I look to this link: http://www.jython.org/Project/jythonc.html
"..jythonc is unmaintained and will not be present in its current form
in Jython 2.5..."
so what can I do??
thank you for the answer!!
 
D

Diez B. Roggisch

I have to use jython 2.5b1 couse with the stable version it's not
possible to use sympy library for mathematic operation but the
"jythonc.bat" it's not included.
I look to this link: http://www.jython.org/Project/jythonc.html
"..jythonc is unmaintained and will not be present in its current form
in Jython 2.5..."
so what can I do??
thank you for the answer!!


What do you need jythonc for? That's purely for a somewhat neater
integration of *Java* with jython - nothing to do with sympy.

Diez
 
R

ruelle

What do you need jythonc for? That's purely for a somewhat neater
integration of *Java* with jython - nothing to do with sympy.

Diez

I need jythonc to compile a simple script in java,
this script import SymPy library.

thank you
ruelle
 
D

Diez B. Roggisch

ruelle said:
I need jythonc to compile a simple script in java,
this script import SymPy library.

You need to find other ways.

The usual approach to this is a factory-pattern with an embedded
Jython-interpreter. There is the Jython-magazine that a couple of years
ago brought a few examples of these techniques. They roughly work as this:


- create a jython-file contains a jython-class
subclassing/implementing some Java class or interface.

- write a java-class that instantiates a jython interpreter

- make that intepreter execute a small script (one-liner) to create
one instance of that jython-class, and assigns it to a global variable.

- fetch that variable's value from the interpreter-instance, and pass
it to some java-code that works with it.

This is working for nearly *all* use-cases, the exception only being
rare casese where some Java-framework itself uses something like
classForName to instantiate a class (e.g. struts for action-classes)

But even then, you could simply create a java delegation class with the
same recipe.

There really is no need for the Jythonc, which is the reason it is
discontinued I presume.

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,815
Messages
2,569,702
Members
45,492
Latest member
juliuscaesar

Latest Threads

Top