https://issues.apache.org/bugzilla/show_bug.cgi?id=54484
Bug ID: 54484
Summary: Its's impossible execute java applications from ant
when this applications use JSR223.
Product: Ant
Version: 1.8.4
Hardware: All
OS: Linux
Status: NEW
Severity: critical
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Created attachment 29896
--> https://issues.apache.org/bugzilla/attachment.cgi?id=29896&action=edit
Example for testing
When an application uses JSR223 and is executed from ant, it's not possible
obtain ScriptEngine for "JavaScript".
Same application, from command line, works perfectly.
This error is obtain:
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory:
Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
I attach an eclipse project with this very simple example:
Class:
package testing;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class TestingGetEngineJavascript {
public static void main(String[] args) {
new TestingGetEngineJavascript().test();
}
public void test() {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("JavaScript");
if(engine == null) {
throw new RuntimeException("Upps!!!!!!! Not ScriptEngine found for
JavaScript");
} else {
System.out.println("ScriptEngine found for JavaScript");
}
}
}
Ant:
<project name="test" default="test" basedir=".">
<target name="test">
<java classpath="dist/testAntJSR223.jar"
classname="testing.TestingGetEngineJavascript">
</java>
</target>
</project>
--
You are receiving this mail because:
You are the assignee for the bug.