9 Replies Latest reply: May 15, 2008 12:07 AM by 843851 RSS

    Exception when try to run xletview

    843851
      hello everyone:

      I have already run xletview before and after some days ,when I tried to run it again, I cannot.
      Below is the exception information :

      Exception in thread "main" java.lang.NoClassDefFoundError: net/beiker/xletview/Main

      I dont know why;-( I uncompressed the files again and the same error. Can you help me out?

      ifaint
        • 1. Re: Exception when try to run xletview
          843851
          I'm not sure if this applies to you, but I was having this problem when I tried running XletView with JDK 1.3.x. I now installed JRE (not the JDK, just the runtime) 1.4.2 and it works fine.
          • 2. Re: Exception when try to run xletview
            843851
            hi ....I'm an italian student...I'm trying to make work xletview but I'm not able too....whn I try to run an Xlet I give the output:

            java.lang.ClassNotFoundException
            at net.beiker.xletview.classloader.XletClassLoader.loadClass(Unknown Sou
            rce)
            at net.beiker.xletview.xlet.XletManager.runXlet(Unknown Source)
            at net.beiker.xletview.xlet.XletManager.setXlet(Unknown Source)
            at net.beiker.xletview.ui.AppMenu.actionPerformed(Unknown Source)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
            n Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.AbstractButton.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
            d(Unknown Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
            [XleTView]-INFO->Application not loaded!


            I think the xlet is right,it an example downloaded from the net.this is the code:

            import java.awt.Color;
            import java.awt.Font;
            import java.awt.event.KeyEvent;
            import java.awt.event.KeyListener;

            import javax.tv.xlet.Xlet;
            import javax.tv.xlet.XletContext;
            import javax.tv.xlet.XletStateChangeException;

            import org.havi.ui.HDefaultTextLayoutManager;
            import org.havi.ui.HScene;
            import org.havi.ui.HSceneFactory;
            import org.havi.ui.HScreen;
            import org.havi.ui.HStaticText;

            /**
            * A simple Xlet with a HStaticText label that changes background color
            * when a key is pressed.
            */


            public class SimpleXlet implements Xlet, KeyListener {

            private XletContext context;
            private HScene scene;
            private HStaticText label;
            private Color[] colors = { Color.black, Color.red, Color.blue };
            private int intColor;

            public SimpleXlet() {
            }

            public void initXlet(XletContext xletContext) throws XletStateChangeException {
            System.out.println("begin initXlet");
            context = xletContext;
            }

            public void startXlet() throws XletStateChangeException {
            System.out.println("begin startXlet");
            HSceneFactory hsceneFactory = HSceneFactory.getInstance();
            scene =

            hsceneFactory.getFullScreenScene(HScreen.getDefaultHScreen().getDefaultHGraphicsDevice());

            scene.setSize(720, 576);
            scene.setLayout(null);
            scene.addKeyListener(this);


            label = new HStaticText("HStaticText", 100, 100, 200, 200, new Font("Tiresias", Font.BOLD, 22),

            Color.yellow, colors[0], new HDefaultTextLayoutManager());
            scene.add(label);

            scene.setVisible(true);
                      scene.requestFocus();
            }

            public void pauseXlet() {
            }

            public void destroyXlet(boolean flag) throws XletStateChangeException {
            System.out.println("destroyXlet");
            if (scene != null) {
            scene.setVisible(false);
            scene.removeAll();
            scene = null;
            }
            context.notifyDestroyed();
            }
            public void keyTyped(KeyEvent e) {
            }

            public void keyReleased(KeyEvent e) {
            }

            public void keyPressed(KeyEvent e) {
            intColor++;
            if (intColor == colors.length) {
            intColor = 0;
            }
            label.setBackground(colors[intColor]);
            label.repaint();
            }

            }

            someone could help me??I don't know what to do.......I've already tried to uninstall jdk but nothing to do.....thanx a lot....
            • 3. Re: Exception when try to run xletview
              843851
              Hi! I'm italian too!
              Are you find the solution?
              • 4. Re: Exception when try to run xletview
                843851
                I tried to compile and tun the code SimpleXlet with no error.
                First I compiled the code using the mhp stub classes taken from mhpkdb project, seconf I run the code with xletview.
                these is the command I tiped:
                java -jar xletview.jar -xletPath C:\apps\test\bin -xletClass SimpleXlet
                • 5. Re: Exception when try to run xletview
                  843851
                  Thank you very much!
                  However I find the solution in other way:
                  XleTView will only run applications that are stored in a different directory to the XleTView application itself. Do not store your application files in the same directory as xletview.jar
                  • 6. Re: Exception when try to run xletview
                    843851
                    can u plz explain exactlly and what code that you have typed on comand prompt? I also have same problem, thank u!
                    • 7. Re: Exception when try to run xletview
                      843851
                      i ahev typed the following and keep having this error:


                      C:\>java -jar xletview.jar -xletPath A:\SimpleXlet -xletClass

                      SimpleXlet
                      ********************************************************
                      XleTView, Copyright (C) 2003 - 2004 Martin Sveden
                      XleTView comes with ABSOLUTELY NO WARRANTY.
                      This is free software, and you are welcome to redistribute
                      it under certain conditions;
                      see license document for details.
                      ********************************************************
                      setting properties...
                      free/used/total: 1169 K / 3050 K / 4220 K
                      running gc...
                      after gc...
                      free/used/total: 2423 K / 2768 K / 5192 K
                      [XleTView]-INFO->loading Xlet... [SimpleXlet]
                      java.lang.ClassNotFoundException
                      at net.beiker.xletview.classloader.XletClassLoader.loadClass(Unknown Sou
                      rce)
                      at net.beiker.xletview.xlet.XletManager.runXlet(Unknown Source)
                      at net.beiker.xletview.xlet.XletManager.setXlet(Unknown Source)
                      at net.beiker.xletview.Startup.<init>(Unknown Source)
                      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

                      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
                      rce)
                      at java.lang.reflect.Constructor.newInstance(Unknown Source)
                      at net.beiker.xletview.Main.main(Unknown Source)
                      [XleTView]-INFO->Application not loaded!
                      • 8. Re: Exception when try to run xletview
                        843851
                        can u plz explain exactlly and what code that you have typed on comand prompt? I also have same problem, thank u!
                        • 9. Re: Exception when try to run xletview
                          843851
                          Hi All,

                          I am new to this Xlet. When i try to run the video file in xletview i am getting "Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError".

                          I have tried the scenario's that u have posted in this thread. But, still am getting the same exception. Can any please tell me how to solve this exception.


                          Thanks in Advance
                          Sourab.