×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

Thanks a million! I don't know how to express my appreciation. Yeah, there is an Exception thrown...

本文发表在 rolia.net 枫下论坛java.lang.ClassNotFoundException: java.util.List
at com/ms/vm/loader/URLClassLoader.loadClass
at java/lang/ClassLoader.loadClassInternal
at Animation.prepareImageRange
at Animator.handleParams
at Animator.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run

Above lines look too profound for a newbie like me.
On the other hand, applets are supposed to run on client side. Does Sun require all web browsers in the world to be particularly set up for java applets? Shouldn't it be default supported by browsers? I tried these applets both in Windows 98 and Window 2000 Server and both with IE5.5 and Netscape4.76. The situations were the same.
I encountered such problems many times while I was reading several Java books.(Java How to programe 3rd edition and Java an Introduction to Computer Science and Programming). I grabbed the applets and html files directly from the CDs. But they just didn't work with web browsers, while they worked well with appletviewer. I'm really confused.更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / Why my web browsers(both IE5.5 and Netscape4.76) can't run some applets? Not all of the applets, just some. Even if I load the demo html files directly from c:/ jdk1.2.2/demo/applets/animator
    None of the four html files can load the applet. They just leave a gray blank area in the pape. But those applets run perfectly with appletviewer.
    (All other applets in the demo fold can be loaded normally.)
    • Your browser failed to load Applets probably because ...
      Your applect used javaxswing.* package. Both IE and NS cannot support javax.swing.

      To shoot the problem, check Java console of your browser. You will see the exception message. For IE, go to View|Java Consolle.

      Good luck.
      • Thank you! I tried. But it didn't work. Any more hints?
        The Animator.class in jdk1.2.2/demo/applets/Animator doesn't have a import line of "Javax.swing.*;".
        All other applets in demo folder can be loaded by my web browsers. I don't know why this one (actually 4) can't.
        There are also many other applets can't be loaded by my web browsers.
        • I tested these applets for you...
          They work in my IE because my IE can load JDK 1.2 classes from the local machine.

          That Animator contains a JDK 1.2 class: java.util.ArrayList. This might be the reason you fail. Be sure go to View|Java Console to check Stack Trace of the exception. Be sure. If you cann resolve the problem yourself, you may post the Exception information in the console.

          The browser has its own console. It is not MS-DOS. Be sure to check IO console of the browser!
          • Thanks a million! I don't know how to express my appreciation. Yeah, there is an Exception thrown...
            本文发表在 rolia.net 枫下论坛java.lang.ClassNotFoundException: java.util.List
            at com/ms/vm/loader/URLClassLoader.loadClass
            at java/lang/ClassLoader.loadClassInternal
            at Animation.prepareImageRange
            at Animator.handleParams
            at Animator.init
            at com/ms/applet/AppletPanel.securedCall0
            at com/ms/applet/AppletPanel.processSentEvent
            at com/ms/applet/AppletPanel.processSentEvent
            at com/ms/applet/AppletPanel.run
            at java/lang/Thread.run

            Above lines look too profound for a newbie like me.
            On the other hand, applets are supposed to run on client side. Does Sun require all web browsers in the world to be particularly set up for java applets? Shouldn't it be default supported by browsers? I tried these applets both in Windows 98 and Window 2000 Server and both with IE5.5 and Netscape4.76. The situations were the same.
            I encountered such problems many times while I was reading several Java books.(Java How to programe 3rd edition and Java an Introduction to Computer Science and Programming). I grabbed the applets and html files directly from the CDs. But they just didn't work with web browsers, while they worked well with appletviewer. I'm really confused.更多精彩文章及讨论,请光临枫下论坛 rolia.net
            • Java Began with applets, but it became hot because of its enterprize application.
              New, people try to avoid use Applets. If we do need use them, we should
              judiciously choose those library classes in JDK 1.1. All the browser do not support JDK 1.2. The problem can be solved by installing Java-Plugin on the client-side. However, do you think the client will be happy?