You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2013/01/25 11:26:39 UTC
[Bug 54484] New: Its's impossible execute java applications from ant
when this applications use JSR223.
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: notifications@ant.apache.org
Reporter: angelcervera@gmail.com
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.
[Bug 54484] Its's impossible execute java applications from ant when
this applications use JSR223.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54484
Jesse Glick <jg...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jglick@apache.org
--- Comment #2 from Jesse Glick <jg...@apache.org> ---
You should always use fork="true" for user programs. fork="false" is only
appropriate for running things that you expect to interact with the live Ant
internal data structures.
Whether it is a (fixable) bug that ScriptEngineFactory behaves this way for JS
inside Ant, I am not sure.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54484] Its's impossible execute java applications from ant when
this applications use JSR223.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54484
Ángel Cervera Claudio <an...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS|Linux |All
Severity|critical |minor
--- Comment #1 from Ángel Cervera Claudio <an...@gmail.com> ---
There are a "temporal" workaround: use fork="true"
But I think that it's a bug.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54484] Its's impossible execute java applications from ant when
this applications use JSR223.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54484
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.9.0 |1.9.1
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54484] Its's impossible execute java applications from ant when
this applications use JSR223.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54484
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8.4 |1.9.0
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54484] Its's impossible execute java applications from ant when
this applications use JSR223.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54484
--- Comment #3 from Ángel Cervera Claudio <an...@gmail.com> ---
This JSR223 application is an utility to process files. At the moment, I
execute this directly as an application, but my idea is build an ANT Plugin
(Now I'm busy, but in a short time I must to do).
In other cases, when I built a ANT Plugin, I didn't have to modified my code.
I suppose that I could force execution of the plugin as a fork. Is this
supposition correct?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54484] Its's impossible execute java applications from ant when
this applications use JSR223.
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54484
Ángel Cervera Claudio <an...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |angelcervera@gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.