6 Replies Latest reply: May 6, 2010 6:02 PM by 843851 RSS

    Why cannot find org.havi.ui.HScene???

      I'm trying to compile an Xlet just for testing purposes (after I know what I can do and how the real project will start), but I've got the following problem:
      This is a piece of code from the Xlet:

      import javax.tv.xlet.*;
      import org.havi.ui.*;
      import org.dvb.ui.*;
      import java.awt.*;

      public class SampleXlet implements Runnable, Xlet {

      private final static int WIDTH = 720;
      private final static int HEIGHT = 576;
      private final static int LEFT_MARGIN = 60;
      private final static int TOP_MARGIN = 60;

      private Thread mainThread;
      private String VERSION = "1.0";
      private String NAME = "SampleXlet";
      private HScene rootContainer;
      Well, at this point I get an error message saying that HScene is undefined!!! I've spent 3 days looking at this (no need to tell I'm getting really desperate, and I want to throw the PC through the window). I think I include the right jar files in the classpath (in fact, I include

      - JMF2.1.1/lib/jmf.jar
      - jars/javatv.jar
      - jars/nanoxml-2.2.3.jar)

      And if I write the following:
      import org.dvb.ui.HScene;

      The compiler says it's undefined :-(

      So, could anybody tell me what's happening? Thanks a lot to everybody and please, excuse my English!

      Raul Mellado
      GTI, Universidad Autonoma de Madrid

      P.S. Thanks again!
        • 1. Re: Why cannot find org.havi.ui.HScene???
          Hi Raul!

          By the looks of the jars in you classpath I guess you are using XleTView. XleTView is an emulator for testing Xlets that are already compiled, it's not meant to be used to compile with. But IF you still decide to do it anyway you should also include the xletview.jar which contains the havi package. My recommendation is that you get your own separate stubs for compiling, this to be sure that you are really only using classes and methods defined in MHP. xletview.jar containes all classes used in the emulator, not only MHP classes.

          You can make a stub jar with the classes you find here:
          and then use that + the javatv.jar found in XleTView

          I hope you understand what I mean, want to help you but had to write this in a hurry so I don't know if it's easy to understand. Didn't want you to have to wait longer to be able to compile. Try it out and if you still have problems post it here, I will read this forum later this weekend.

          Good luck!

          /beiker :-)
          • 2. Re: Why cannot find org.havi.ui.HScene???
            Beiker, thanks a lot for your mega-quick help. Anyway, I have just read your answer...
            I understand what you mean, but my question is: to build the .jar file do I have to compile the .java files included in
            first? Because I guess I must make the jar file out of .class files, and not .java.
            Am I right?

            Thanks again


            P.S. I have extracted the file xletview.jar (it was previously included in my classpath, and didn't work, either), and the file HScene.class is included in it. So I cannot understand why my compiler can't find HScene... :`-(
            • 3. Re: Why cannot find org.havi.ui.HScene???
              Hi Raul!
              Yes, first you have to compile the java files into class files. I think a lot of people have trouble finding what they need to get going with MHP so I put the jar here:

              Include that jar in your classpath and it should work, anyway tell me how it goes.

              • 4. Re: Why cannot find org.havi.ui.HScene???
                You are god!
                Thanks a lot, really! Everything working o.k.
                Best regards

                Raul (from Spain)
                • 5. Re: Why cannot find org.havi.ui.HScene???
                  Beiker, you are the best!!!

                  I was in the middle of nonewhere trying to find a direction in BDJ, and you just pointed it to me.

                  thanks a lot, a million, a trillion.
                  • 6. Re: Why cannot find org.havi.ui.HScene???
                    Could you please repost the .jar file? The link no longer works.

                    I do have an OCAP implementation of Havi, but I'm guessing it is incomplete - I cannot resolve setBackgroundMode() - none of the parameters I try are accepted. i.e IMAGE_CENTER.