Bonjour
L'exemple de Mozilla (https://developer.mozilla.org/en-US/.../Serialization) ne marche pas chez moi.
J'aimerais savoir pourquoi, merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 $ rhino js> function f() { return 3; } js> serialize(f, "f.ser") js> quit() $ rhino js> f = deserialize("f.ser") org.mozilla.javascript.WrappedException: Wrapped java.lang.ClassNotFoundException: org.mozilla.javascript.gen._stdin__1 at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) at org.mozilla.javascript.gen._stdin__1._c_script_0(Unknown Source) at org.mozilla.javascript.gen._stdin__1.call(Unknown Source) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) at org.mozilla.javascript.gen._stdin__1.call(Unknown Source) at org.mozilla.javascript.gen._stdin__1.exec(Unknown Source) at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:502) at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:178) at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:102) at org.mozilla.javascript.Context.call(Context.java:489) at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504) at org.mozilla.javascript.tools.shell.Main.exec(Main.java:160) at org.mozilla.javascript.tools.shell.Main.main(Main.java:138) Caused by: java.lang.ClassNotFoundException: org.mozilla.javascript.gen._stdin__1 at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:270) at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623) at org.mozilla.javascript.serialize.ScriptableInputStream.resolveClass(ScriptableInputStream.java:56) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at org.mozilla.javascript.tools.shell.Global.deserialize(Global.java:363) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) ... 15 more![]()
Partager