aspose file tools
The moose likes Jython/Python and the fly likes jython engine: implementation fails Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Languages » Jython/Python
Reply locked New topic
Author

jython engine: implementation fails

Arthur Burma
Greenhorn

Joined: Nov 12, 2009
Posts: 16
Hi,

In order to use python in java project, i've added the jython following dependency :


But , when i call engine factories :



i get the following engines , but not jython ...


ScriptEngineFactory Info
Script Engine: Mozilla Rhino (1.6 release 2)
Engine Alias: js
Engine Alias: rhino
Engine Alias: JavaScript
Engine Alias: javascript
Engine Alias: ECMAScript
Engine Alias: ecmascript
Language: ECMAScript (1.6)
ScriptEngineFactory Info
Script Engine: AppleScriptEngine (1.0)
Engine Alias: AppleScriptEngine
Engine Alias: AppleScript
Engine Alias: OSA
Language: AppleScript (2.0.1)


regards;



Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35253
    
    7
Are you certain that the Jython scripting engine is in the classpath when you run that code?

Have you tried registering it through the ScriptEngineManager API?


Android appsImageJ pluginsJava web charts
Arthur Burma
Greenhorn

Joined: Nov 12, 2009
Posts: 16
The classpath is the problem, because when i add jython jar as external dependency , jython engine becomes available.
But then, i use the mvn dependency for jython 2.5.0 (mvn 2.2.1) , ScriptEngine is no avilable anymore...

I had first placed this post in maven forum, but no clue at the moment,

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35253
    
    7
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread.

It seems as if this has nothing to do with Jython, but is a Maven configuration issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jython engine: implementation fails
 
Similar Threads
Funny exception with StringBuffer with jsf
Where do I get java-engine.jar to make new ScriptEngineManager().getEngineByName("java"); work
Error slf4j-api, I can't exclude slf4j-api for Jboss
maven: dependency not added to the classpath during runtime
Could not resolve dependencies for maven project