【发布时间】:2010-01-05 09:04:37
【问题描述】:
我们有一个从 Java 1.3 移植到 Java 1.5 的遗留程序。此应用程序涉及以前运行良好的小程序。然而,移植后,小程序将无法加载。但是没有错误或异常。该应用程序只会尝试永远加载它。我们尝试使用 Java 1.6 和 poof 运行它!没有任何问题。 Java 6 不向后兼容吗?那么为什么它会在那个版本而不是 1.5 中运行呢?
====
Java 1.5.0_19 的 Java 控制台日志
basic: Registered modality listener
basic: Registered modality listener
basic: Registered modality listener
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: URL
liveconnect: Invoking JS method: URL
liveconnect: Invoking JS method: URL
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=1
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=2
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@b0bad7
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@ba9340
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@1198891
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=4
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=4
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=4
basic: Releasing classloader: sun.plugin.ClassLoaderInfo@bb7759, refcount=3
network: Connecting <something>.jar with proxy=HTTP @ proxy/<ip address>
basic: Loading <something>.jar from cache
basic: No certificate info, this is unsigned JAR file.
Left START init()
Left END init()
Right START init()
Control start() Waiting for Left Panel to load...
Right START start()
network: Connecting socket://<ip address>:14444 with proxy=DIRECT
Control start() Waiting for Left Panel to load...
Control start() Waiting for Left Panel to load...
Control start() Waiting for Left Panel to load...
my HostName : <ip address>
Thread-19 Check :
Thread-19 Check : Monitor : run : start
Thread-20 Monitor : Monitor: run() start
Control start() Waiting for Left Panel to load...
Control start() Waiting for Left Panel to load...
Control start() Waiting for Left Panel to load...
Control start() Waiting for Left Panel to load...
Control start() Waiting for Left Panel to load...
Control start() Waiting for Left Panel to load...
最后一条消息永远存在......现在有了工作版本:
====
Java 1.6.0_15 的 Java 控制台日志
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1b000e7
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@12611a7
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1807ca8
network: CleanupThread used 6 us
network: CleanupThread used 5 us
network: CleanupThread used 6 us
cache: Skip blacklist check as cached value is ok.
network: Cache entry found [url: <something>.jar, version: null]
network: Connecting <something>.jar with proxy=HTTP @ proxy/<ip address>
network: ResponseCode for <something>.jar : 304
network: Encoding for <something>.jar : null
network: Disconnect connection to <something>.jar
Reading certificates from 11 <something>.jar | <something>.idx
network: No certificate info for unsigned JAR file: <something>.jar
basic: Applet loaded.
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 330275 us, pluginInit dt 27768955 us, TotalTime: 28099230 us
Right START init()
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 330275 us, pluginInit dt 27770563 us, TotalTime: 28100838 us
Left START init()
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 330275 us, pluginInit dt 27779332 us, TotalTime: 28109607 us
Left END init()
basic: Applet initialized
basic: Removed progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@12611a7
basic: Applet made visible
就是这样。仍然没有弄清楚为什么它适用于 java6 而不是 java5。
@valli:使用了对象标签,而不是小程序
@thorbjorn:我已经试过了......它只是一直说正在加载小程序......
@aaron:如果真的有异常,我怎么知道它是什么异常?是的,我们认为它是一个 java 错误,但我仍然没有找到那个错误是什么。我明天必须提交一份报告,我已经在网上搜索过,但目前还没有任何结果......
@all:谢谢你的回复
【问题讨论】:
-
给个加载小程序的html代码怎么样?
-
不能。我们不被允许。我们的合同中有一些关于此的内容......对不起。
-
如果有帮助的话,我添加了 java 控制台日志。虽然我删除/更改了一些部分,如类名和目录