Java 小程序不加载

Java 小程序不加载,java,applet,Java,Applet,我们有一个从Java1.3移植到Java1.5的遗留程序。此应用程序涉及以前工作正常的小程序。但是,移植后,小程序将不会加载。但是,没有错误或例外。该应用程序将尝试永远加载它。我们试着用Java1.6和poof运行它!没问题。Java6不是向后兼容的吗?那么,为什么它会在该版本中运行,而不是在1.5中运行呢 ==== Java 1.5.0_19的Java控制台日志 最后一条信息将永远持续下去。。。现在是工作版本: ==== Java 1.6.0_15的Java控制台日志 就这样。仍然没有弄明白为

我们有一个从Java1.3移植到Java1.5的遗留程序。此应用程序涉及以前工作正常的小程序。但是,移植后,小程序将不会加载。但是,没有错误或例外。该应用程序将尝试永远加载它。我们试着用Java1.6和poof运行它!没问题。Java6不是向后兼容的吗?那么,为什么它会在该版本中运行,而不是在1.5中运行呢

====

Java 1.5.0_19的Java控制台日志 最后一条信息将永远持续下去。。。现在是工作版本:

====

Java 1.6.0_15的Java控制台日志 就这样。仍然没有弄明白为什么它可以使用java6而不是java5

@valli:使用的是对象标记,而不是小程序

@thorbjorn:我已经试过了。。。它一直在说加载applet

@亚伦:如果真的有例外,我怎么知道是什么例外?是的,我们认为这是一个java错误,但我仍然没有发现这个错误是什么。我明天必须提交一份报告,我已经搜遍了网络,但到目前为止什么也没找到


@所有人:谢谢你的回复

可能有个例外,但你没有看到,可能是被吞下了。或者它是Java 5版本中的一个bug,已在Java 6中修复。

一个可能的问题是,如果您的小程序使用小程序标记嵌入html页面,则必须修改它以使用对象标记,因为小程序标记已被弃用

启用Java控制台以及控制台中的所有跟踪/调试信息


然后尝试重新加载小程序,看看它是怎么说的。

Java 6与Java 5向后兼容,但这只是意味着在Java 5下工作的小程序也可以与Java 6一起工作。您的小程序使用Java6,而Java6并没有说明它是否应该使用Java5。Java 6中显然有一些在Java 5下运行时不可用的新特性

如果您的代码使用的类仅在Java6下可用,我希望在Java5下看到ClassDefNotFoundError或ClassNotFoundException。也就是说,在代码中的某个地方,您可能正在捕获并默默地接受异常。寻找任何空的catch块或过宽的catch块,即捕捉异常或Throwable,而不是更具体的内容。如果代码是多线程的,考虑添加到每个线程来记录任何问题。

除此之外,在JDK 5小程序查看器中启动小程序,并附加一个调试器以尝试查明问题的位置


编辑:你用JDK5构建小程序了吗?这将突出任何兼容性问题。如果您是使用JDK 6构建的,至少要将编译器设置为生成Java 5字节码。但是,您最好也使用JDK 5或JDK 6的-bootclasspath选项来构建JDK 5类,这样您就可以查看是否使用了其中没有的任何内容。

给出加载小程序的html代码如何?不能。我们不允许这样做。在我们的合同中有这样的东西。。。对不起,如果有帮助的话,我添加了java控制台日志。虽然我删除/更改了一些部分,如类名和目录,但我们也使用JDK5构建了小程序。我试着用Java5和Java6运行小程序。。。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...
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