Install/unzip all of that into a set of directories. Doesn't matter where. But remember where you put 'em.

Fire up Eclipse. You'll want to go back to eclipse.org and read through the first couple of sections of the faq, there's a link right on the front page. Work your way down to 'How do I write a "Hello World" program?. Try that...get that working first. It'll show you some of the basics.

Now let's try the same thing with HME.

Create a new project (you should probably go ahead and 'close' your old project by right-clicking on it and selecting 'close'). Name it anything you want. Eclipse will create it, and automatically add the JRE System Libraries to it (standard Java libraries).

Now Right click on the new project (in the explorer window on the left side of the screen), and select Properties. Go to Java Build Path. Select Libraries. Select Add External JARs. Browse and find the files named HME.jar and hme-host-sample.jar in the HME SDK directories. Select both of those, press OK, and Eclipse will add the hme.jar and hme host libraries to the project too.

Create a new package within that project. You can name it whatever you want...our guys use com.tivo.hme, you can use anything, just try to make it unique to you. All lower case. This creates a hierarchy of folders within your eclipse 'workspace' folder, matching whatever you type (eg. empty 'hme' folder inside a 'tivo' folder inside a 'com' folder.

Create a new class within that package. Name it HelloWorld (mind the capitalization, java is picky). Eclipse will create a new class and will auto-fill a bunch of information for you...the start of a program. Select it all, and delete it.

Open up the sample HelloWorld.java app from the HME SDK using any text editor. Copy everything from there into the new class you created in Eclipse (replacing the auto-fill stuff).

Find the line near the top that says 'package com.tivo.hme.samples.HelloWorld'...change it to say 'package xxx.yyy.zzz' where xxx.yyy.zzz is the name you gave your package earlier. All lowercase.

One more thing and you're ready to try and run this thing. You need to copy the icon file from the HME SDK directories to the package. This is easy. Just go to 'My Computer' or 'Windows Explorer' or whatever you use to browse files on your PC. Go to the HME SDK directory you created, and dig through to where the source (src) for the samples are. In the directory called Hello you'll find an icon.png file. Drag that over to the package icon you created in Eclipse. The file will be copied into the Eclipse directories for your java project.

Now, select 'Run' from the menu bar, and scroll down the drop down window and select Run... Don't choose Run As!

A Run window will open. Click on Java Application (to the left), and then press the 'new' button. It'll create a new file labeled 'New_configuration'. Highlight it. This is the runtime configuration for this particular program. Change the Name: to something that makes sense (like HelloWorld). The Project name should be auto-filled. Below that is Main Class. Make sure that 'Include external jars when searching for main class' is checked on. Type the following into the Main class dialog: com.tivo.hme.host.sample.Main.

Now click the 'Arguments' tab (still in the Run dialog window). Under 'Program Arguments' type the packagename.classname (eg. com.tivo.hme.HelloWorld, or xxx.yyy.zzz.HelloWorld). That's the packagename followed by the classname...you need both this time.

Remember to pay attention to capitalization.

Now click 'Run'.

You should see a console window open at the bottom of the screen, and it'll say something like this:

You can either double click the simulator.jar file in the HME SDK directories, or go to 'Music, Photos & More' on your TCD and view your application. The backdoor for turning on MP&M is clear clear 0 0 on the System Info screen.

If you can get through the above, and you see "Hello World" on your TV...you did it! Now you can focus on learning Java, rather than trying to make the tools behave.

Good job Pony. Eclipse is definitely a nice ide for beginners and experts alike.

I would also recommend creating a second "Run..." configuration where instead of using the "Factory" class as your main executable, you use the "Simulator" class. (Keep the arguments string the same). That way, you can test your app in the simulator with one click, instead of having to start the factory and then launch the simulator from outside eclipse.

Good job Pony. Eclipse is definitely a nice ide for beginners and experts alike.

I would also recommend creating a second "Run..." configuration where instead of using the "Factory" class as your main executable, you use the "Simulator" class. (Keep the arguments string the same). That way, you can test your app in the simulator with one click, instead of having to start the factory and then launch the simulator from outside eclipse.

Good idea, that's slick.

You also have to add both hme.jar and simulator.jar when you're setting up your project.

Been a bad day for installing things, tried to install a printer on my old fileserver PC, the program ran once, said there wasn't enough disk space, and won't run again (there's plenty of space now), of course it's running WINME so I get what I deserve. Went to install all of the java stuff on this laptop and somehow I screwed up and deleted something I shouldn't have. That's what I get for using this laptop in bed.

Think everything is installed now and happy so I'll try what's in your post.

you also easily fool around with all the samples included in the SDK by choosing File>Import>Existing Ant Buildfile
(first change the pathelement of hme.jar) and browse to hme_sdk_ea1\samples\build.xml

HME is coming to the DVD platforms, we started with the standalones. Remember, for now it's really a developers-only kind of feature, it's not intended yet for the average consumer. Later this year you'll see it more front and center, and on more boxes.

Thanks TivoPony for posting that walkthrough, certainly made things easy. Now I can put up provacative messages for my wife to check during commercials if I can keep her from pressing the skip button long enough.

you also easily fool around with all the samples included in the SDK by choosing File>Import>Existing Ant Buildfile
(first change the pathelement of hme.jar) and browse to hme_sdk_ea1\samples\build.xml

Sorry if this should be obvious, but can you post and example showing how to change the pathelement of the hme.jar?

Sorry if this should be obvious, but can you post and example showing how to change the pathelement of the hme.jar?

this is what i changed my build.xml to include:

<property name="hme.jar" location="C:\TivoHME\hme_sdk_ea1\hme.jar"/>

<pathelement path="${hme.jar}"/>

of course you need to change "C:\TivoHME\hme_sdk_ea1\hme.jar" to wherever your hme.jar is located.

btw you can also add the bananas samples to the hme samples.
right click on TiVo HME Sample Applications:Import>File System, then browse to C:\TivoHME\bananas_ea1\sample\src Seclect All>Finish
then you add bananas.jar to your Java Build Path-Libraries(Add External Jars...)

First, thanks for a nice writeup to get us java newbies moving. I've played around with a similar writeup that allowed me to write HelloWorld using another IDE, NetBeans. Would you say this environments are similar or does eclipse offer something uniquely well suited to HME dev?

More importantly, I'd love to see a sample project (or writeup - but preferably the former) that shows the way when using the bananas classes. I successfully got a project to run, but I'm not entirely sure how it worked nor could I walk someone thru it! Would you be up for another writeup with attachments?

OK, I'm trying to make my own Bananas app using BananasSampleScreen & TextScreen as templates. The problem is I put these both in com.judremy.hme similar to the example by TivoPony and try to get them to run, but the error I keep getting is:

error: no constructor: com.judremy.hme.ScreenBack.<init>()
error: make sure the class is public and has a public default constructor

ScreenBack is similar to BananasSampleScreen
HelloWorld is similar to BText

First, thanks for a nice writeup to get us java newbies moving. I've played around with a similar writeup that allowed me to write HelloWorld using another IDE, NetBeans. Would you say this environments are similar or does eclipse offer something uniquely well suited to HME dev?

Many thanks,
Jeff

nothing uniquely suited to HME but eclipse is emerging as the standard platform upon which most other good IDES for Java are built. NetBeans may be from the source of Java but eclipse is much more universal and eclipse 3 is just the way to go.

__________________
You just need to disable your sense of shame for all humanity and click past the break

nothing uniquely suited to HME but eclipse is emerging as the standard platform upon which most other good IDES for Java are built. NetBeans may be from the source of Java but eclipse is much more universal and eclipse 3 is just the way to go.

Um, I disagree wholeheartedly with this statement. It is both an oversimplification and factually incorrect.

Eclipse and NetBeans are probably the two most popular "free"/open-source IDE development platforms. Both focus on Java, though they also support (to varying degrees) other languages.

Both can also be used as application development frameworks themselves, not just as IDEs for building external applications. That is, you can build other apps out of the eclipse and netbeans code itself that aren't ide's.

Claiming that "eclipse is much more universal" doesn't make too much sense, because the IDE field is vast, with competing Java IDEs like JBuilder, IntelliJ IDEA, Oracle JDeveloper, etc. It is true that some other IDEs are built on Eclipse, like IBM's WebSphere IDE, but it's also true that others are built on top of NetBeans, like SunOne Application Studio. But eclipse as"the standard platform upon which most other good IDES for Java are built", I don't think so.

In the open source community, eclipse definitely has more momentum right now for lots of people, partially because for a few versions eclipse was a little bit faster-seeming, and because plugins are a little bit easier to develop for eclipse. NetBeans is far from dead, and is overall still a better IDE for doing web development (like with JSPs) out of the box.

Right now, I primarily use eclipse both at work and at home, but I recognize that there's no one IDE that's perfect for everyone. Nor should there be. Healthy competition on features and price move everyone forward.

HME is coming to the DVD platforms, we started with the standalones. Remember, for now it's really a developers-only kind of feature, it's not intended yet for the average consumer. Later this year you'll see it more front and center, and on more boxes.

Well, I'll ask it (even though I can guess the answer) What are the chances of seeing this on DirecTivo?

I knew there was a reason I didn't want to get into a NetBeans vs. Eclipse debate!

Anyone developing an HME app on any IDE has my support. I'm using Eclipse because...that's what I started with. Pick one and run with it! Your customers will never know which you chose.

Pony

I agree with this TiVoPony - my advice was more to people starting out in Java then those that have a tool set they use already. The power of Java is its versatility to be used in many different ways and not be constricted to only one supported approach. That is the very power of HME itself. I gave my simplified view and am done.

PS I had to laugh though when at the end of the post dropd siad he was using eclipse both at work and at home

__________________
You just need to disable your sense of shame for all humanity and click past the break

PS I had to laugh though when at the end of the post dropd siad he was using eclipse both at work and at home

I'm not sure why you had to laugh at this. My point was simply that it's not productive for you to criticize the guy who was asking if it was ok to work in NetBeans, or to discourage folks from finding the toolset that works best *for them*. There is NO HME advantage to using eclipse. And eclipse is far from universal.