-
Bug
-
Resolution: Fixed
-
P2
-
fx2.1
-
Windows 7, x86
I'm using Netbeans 7.1.2 to deploy a JavaFX application.
In my application, i use Rhino to call some Java Code like this:
Packages.com.ht.ActionUtil.fromScript();
it works well in netbeans, but after i deploy it to a jar file, when i try to run it, it throws a Exception :
javax.script.ScriptException: sun.misc.InvalidJarIndexException: Invalid index
at com.sun.script.javascript.RhinoCompiledScript.eval(Unknown Source) ~[na:1.6.0_31]
at javax.script.CompiledScript.eval(Unknown Source) ~[na:1.6.0_31]
at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel.exeuteScript(ShowMenuAction.java:162) [ht-web-client.jar:1.0]
at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel.access$200(ShowMenuAction.java:100) [ht-web-client.jar:1.0]
at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel$2.run(ShowMenuAction.java:151) [ht-web-client.jar:1.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_31]
at java.lang.Thread.run(Unknown Source) [na:1.6.0_31]
Caused by: sun.misc.InvalidJarIndexException: Invalid index
at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source) ~[na:1.6.0_31]
at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source) ~[na:1.6.0_31]
at sun.misc.URLClassPath.getResource(Unknown Source) ~[na:1.6.0_31]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.6.0_31]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_31]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.6.0_31]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.6.0_31]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.Kit.classOrNull(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.NativeJavaPackage.getPkgProperty(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.NativeJavaPackage.get(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptableObject.getProperty(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptRuntime.getObjectProp(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptRuntime.getObjectProp(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.Interpreter.interpret(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.InterpretedFunction.call(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(Unknown Source) ~[na:1.6.0_31]
at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(Unknown Source) ~[na:1.6.0_31]
at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(Unknown Source) ~[na:1.6.0_31]
... 8 common frames omitted
In my application, i use Rhino to call some Java Code like this:
Packages.com.ht.ActionUtil.fromScript();
it works well in netbeans, but after i deploy it to a jar file, when i try to run it, it throws a Exception :
javax.script.ScriptException: sun.misc.InvalidJarIndexException: Invalid index
at com.sun.script.javascript.RhinoCompiledScript.eval(Unknown Source) ~[na:1.6.0_31]
at javax.script.CompiledScript.eval(Unknown Source) ~[na:1.6.0_31]
at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel.exeuteScript(ShowMenuAction.java:162) [ht-web-client.jar:1.0]
at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel.access$200(ShowMenuAction.java:100) [ht-web-client.jar:1.0]
at com.ht.svg.action.ShowMenuAction$RTDAMenuItemModel$2.run(ShowMenuAction.java:151) [ht-web-client.jar:1.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_31]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_31]
at java.lang.Thread.run(Unknown Source) [na:1.6.0_31]
Caused by: sun.misc.InvalidJarIndexException: Invalid index
at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source) ~[na:1.6.0_31]
at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source) ~[na:1.6.0_31]
at sun.misc.URLClassPath.getResource(Unknown Source) ~[na:1.6.0_31]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.6.0_31]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.6.0_31]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.6.0_31]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.6.0_31]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.Kit.classOrNull(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.NativeJavaPackage.getPkgProperty(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.NativeJavaPackage.get(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptableObject.getProperty(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptRuntime.getObjectProp(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptRuntime.getObjectProp(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.Interpreter.interpret(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.InterpretedFunction.call(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(Unknown Source) ~[na:1.6.0_31]
at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(Unknown Source) ~[na:1.6.0_31]
at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(Unknown Source) ~[na:1.6.0_31]
at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(Unknown Source) ~[na:1.6.0_31]
... 8 common frames omitted