TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Underground Playground > Developers Corner
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 03-15-2005, 07:03 PM   #31
Robs67
Registered User
 
Join Date: Dec 2001
Location: Templeton, MA
Posts: 196
I've never done any Java programming so please have mercy on me.
I followed Pony's instructions ( or so it would seem) but when I click on the "Run" button I get:
error: class not found: com.tivo.hme.HelloWorld
error: check the classpath and access permissions

Can anyone help me out?
Robs67 is offline   Reply With Quote
Old 03-15-2005, 07:17 PM   #32
ScottKuma
Robble robble!
 
Join Date: Aug 2002
Location: NE of Cincinnati, OH
Posts: 16
Thumbs up

I had the same problem:

Make sure that you changed the "package ..." line at the top of the file to match what you typed in this step:

Quote:
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.
I suspect that will solve your problem.

If not, make sure that you've created a run configuration, as in the following step:

Quote:
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. Then type the word Factory into the dialog above that checkbox. Click 'Search', and you'll see a dialog of classes. Scroll down to the one labeled Factory and select it. The Main class dialog will then be auto-filled with the right path for the class (something like com.tivo.hme.Factory). All of that is on the 'Main' tab.
Hope that helped!!
ScottKuma is offline   Reply With Quote
Old 03-15-2005, 07:24 PM   #33
Robs67
Registered User
 
Join Date: Dec 2001
Location: Templeton, MA
Posts: 196
Thanks ScottKuma. I think I had a hierarchy issue. Eclipse gave a suggestion, which I followed and now it works.

Thanks again.
Robs67 is offline   Reply With Quote
Old 04-06-2005, 09:54 PM   #34
zomper514
Registered User
 
Join Date: Apr 2005
Posts: 1
Class file is being create but the Samples Jar seems unchanged

I am trying to modify the Hello World sample included in the sample files. I want the program to say "Hello, Mark!" Instead. A simple change.

I modified the file and used the following compile line on My OSX Machine:

javac -classpath /hme_sdk_ea1/hme.jar -sourcepath /hme_sdk_ea1/samples/src/com/tivo/hme/samples/ HelloWorld.java


This created a HelloWorld.class file.

However I next ran the Simulator and the file was not modified?

java -cp samples/samples.jar com.tivo.hme.sdk.Factory com.tivo.hme.samples.hello.HelloWorld

I think the samples.jar file was never updated
zomper514 is offline   Reply With Quote
Old 05-03-2005, 01:52 AM   #35
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
'ArrayOutOfBoundsException' fix

A quick note -- if you get an exception when you try to run this in the Simulator, make sure you have an active network interface on your machine. I was originally trying this on my laptop and getting an exception. Once I switched on my wireless access, the Simulator started working properly.

BTW, thanks, TiVoPony, for the helpful startup instructions -- this kind of thing is great.
F8ster is offline   Reply With Quote
Old 05-04-2005, 01:08 PM   #36
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
For those of you more visually oriented, I have recorded a screen video of this excellent introduction from TiVoPony (Flash required). Since I can't post links, you can find this demo on my website (click on my name to the left there to visit my homepage); find the link to 'TiVo App SDK - Cool!' in the left-hand nav, and it's linked off that page under 'Writing Your First Application.'

Note the little green progress bar and pause/play control at the bottom, if you need to pause it in the middle.
F8ster is offline   Reply With Quote
Old 05-04-2005, 03:33 PM   #37
SafariKC
My TiVo reboots alot
 
SafariKC's Avatar
 
Join Date: Mar 2000
Location: Marlborough, MA, USA
Posts: 565
Quote:
Originally Posted by F8ster
For those of you more visually oriented, I have recorded a screen video of this excellent introduction from TiVoPony (Flash required). Since I can't post links, you can find this demo on my website (click on my name to the left there to visit my homepage); find the link to 'TiVo App SDK - Cool!' in the left-hand nav, and it's linked off that page under 'Writing Your First Application.'

Note the little green progress bar and pause/play control at the bottom, if you need to pause it in the middle.


http://bitrazor.com/content/tivo/hme...pse_demo1.html
__________________
Beginning TiVo Programming

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
SafariKC is offline   Reply With Quote
Old 05-04-2005, 03:37 PM   #38
TiVoPony
TiVo Forum Special Member
 
TiVoPony's Avatar
 
Join Date: May 2002
Location: Alviso, California
Posts: 2,194
Quote:
Originally Posted by F8ster
For those of you more visually oriented, I have recorded a screen video of this excellent introduction from TiVoPony (Flash required). Since I can't post links, you can find this demo on my website (click on my name to the left there to visit my homepage); find the link to 'TiVo App SDK - Cool!' in the left-hand nav, and it's linked off that page under 'Writing Your First Application.'

Note the little green progress bar and pause/play control at the bottom, if you need to pause it in the middle.
Nicely done!

We've added it to the 'news' section of the sourceforge site:
TiVo HME SourceForge Site

Thanks for doing that. Very cool.

Pony
__________________
Director of Product Marketing
TiVo Inc.
TiVoPony is offline   Reply With Quote
Old 05-13-2005, 02:27 PM   #39
mgan42
Registered User
 
Join Date: May 2005
Posts: 4
Using HME via IKVM.NET and Mono

Great tutorial. Thanks.

Now, I'd like to try using the HME SDK via IKVM on Mono. Have any Mono/C# fanatics tried this yet? My main reason is so that I can write my test application in C#, and use the Java HME SDK via import through IKVM. Since the HME simply runs on the PC, and not on the Tivo, I'm hoping this setup will work nicely.

I would have provided HTML links to IKVM and Mono, but I'm prohibited, since this is my first post on this forum. Very annoying...

Anyway, any IKVM,Mono,C# folk out there?
mgan42 is offline   Reply With Quote
Old 05-24-2005, 02:22 PM   #40
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
Extensive tutorial: writing a new app from the beginning

Well, this thread inspired me to begin writing my own app -- a "Traffic Cam Viewer" application. As I have progressed, I have documented everything in the form of a fairly extensive tutorial, one of those "learn it in an hour a day" kinds of tutorials.

In addition to the HME SDK. I also show how to get started with the Bananas UI toolkit. There's also a number of more intermediate Eclipse tips (using the debugger, etc.)

Since I can't yet post links, you can find this tutorial by clicking my username 'F8ster' over there on the left, selecting 'Visit F8ster's Homepage!', then choosing 'TiVo App Tutorial' from the left-hand nav bar on my homepage.

Comments and suggestions welcome. Enjoy -- Dave
F8ster is offline   Reply With Quote
Old 05-25-2005, 02:05 AM   #41
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
URL for New Tutorial

Here's the link for the new "Traffic Cam App" tutorial I mentioned in my last reply:

http://bitrazor.com/content/tivo/hme...rial/index.php

Last edited by F8ster : 05-25-2005 at 02:23 AM.
F8ster is offline   Reply With Quote
Old 05-29-2005, 05:03 PM   #42
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
Deploying your TiVo Project via JNLP

Quote:
Originally Posted by boscodegama
Anyway, I know enough about Java to be dangerous but don't know a lot of the methodology and practices. Anyone want to clue me in on how to create a Web Start JNLP from my project?
thanks..
Having just fought this battle myself, I documented the steps I used to create a JNLP deployment for my TiVo app and stuck them here. Not sure if I've got all of the best practices down pat yet, but this process worked for me:

http://bitrazor.com/content/tivo/hme...deployment.php

Other developer how-tos may be found here:

http://bitrazor.com/content/tivo/hme...rial/index.php

-- Dave
F8ster is offline   Reply With Quote
Old 10-22-2005, 02:25 PM   #43
elrothir
Registered User
 
Join Date: Dec 2004
Location: KS
Posts: 21
Simulator problem

I am attempting this tutorial and I think I'm just missing one minor thing, but can't seem to track it down. If someone could point me in the right direction, it'd be greatly appreciated. I set up the project in Eclipse and go to run it in the simulator, but when the simulator comes up, I get:

ERROR: File not found ://192.168.123.104:7288/hme

(The message parser thought I was trying to imbed a url, so that's why I did the ... slash-slash thing. The actual error message has "h" ttp in front of the ://). The xxx... IP address is the IP of my PC that I'm running on. I have a Linksys router and it has the firewall on, but since it's not going outside my subnet, I didn't think that'd matter. Though I'm pretty computer literate(am a programmer by trade), I'm not real strong on the firewall stuff.

I just turned off the firewall and get the same error. My PC is running Galleon and works with no problems and the Tivo can see the music and pictures on my PC, so I'm really not sure why the simulator doesn't work. Also, not sure if it matters, but when I select Run and do a search for the Main Class, I do not see Factory in the list. I see Simulator and choose that one, but Factory is not on the list even though hme.jar was loaded...

Any suggestions?

Thanks,
elrothir
__________________
Sony SVR2000 (100 hours)
Sony SVR2000 (30 hours)
Tivo Series2(40 hours)
Tivo Series2 DT(180 hours)

Last edited by elrothir : 10-22-2005 at 02:53 PM.
elrothir is offline   Reply With Quote
Old 10-24-2005, 06:43 PM   #44
TiVoPony
TiVo Forum Special Member
 
TiVoPony's Avatar
 
Join Date: May 2002
Location: Alviso, California
Posts: 2,194
Quote:
Originally Posted by elrothir
I am attempting this tutorial and I think I'm just missing one minor thing, but can't seem to track it down. If someone could point me in the right direction, it'd be greatly appreciated. I set up the project in Eclipse and go to run it in the simulator, but when the simulator comes up, I get:

ERROR: File not found ://192.168.123.104:7288/hme
Hi there,

The error you're seeing is due to a recent change in the hosting implementation. We don't use Factory anymore, instead you should type com.tivo.hme.host.sample.Main into the Main class dialog in Eclipse.

Also, when you add external libraries to your project, make sure to include the hme-host-sample.jar file as well.

I've updated the tutorial, sorry about the confusion!

Cheers,
Pony
__________________
Director of Product Marketing
TiVo Inc.
TiVoPony is offline   Reply With Quote
Old 11-20-2005, 07:48 PM   #45
leep
Registered User
 
Join Date: Oct 2005
Posts: 1
Eclipse with Multiple Network Interfaces

I have multiple Network Interfaces. When I run the HelloWorld sample from this thread it binds to the wrong IP. I've tried adding the -i <correct ip> to the Program arguments like it shows in the SDK samples, but that doesn't work. How can I tell it to bind to the correct IP?
leep is offline   Reply With Quote
Old 11-20-2005, 09:40 PM   #46
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
I believe that with HME v1.3 and above, the option changed from "-i" to "--intf".
F8ster is offline   Reply With Quote
Old 11-20-2005, 11:08 PM   #47
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
Flash demo of this tutorial updated

I have updated the Flash demo of this tutorial for HME v1.3 and 1.4:

http://bitrazor.com/content/tivo/hme...ipse_demo1.php


F8ster is offline   Reply With Quote
Old 11-29-2005, 10:50 AM   #48
RedMan8
Registered User
 
Join Date: Sep 2005
Posts: 176
Make Jar File

I was able to follow the Flash Tutorial (thanks F8ster!)... but I'm now trying to compile my new "Hello World" application into a .jar file.

I have a manifest file, but whenever I double-click on the jar it tells me it can't find the main class. I have tried a whole bunch of settings in my manifest file but none of them seem to work.

Any ideas what I could be doing wrong?
RedMan8 is offline   Reply With Quote
Old 11-29-2005, 11:38 AM   #49
RedMan8
Registered User
 
Join Date: Sep 2005
Posts: 176
Just to give a little more detail... this is all I currently have in my manifest file:

Manifest-Version: 1.0
Main-Class: com.tivo.hme.host.sample.Main

The error message I'm getting when I double-click the jar file is:
Could not find the main class. Program will exit.
RedMan8 is offline   Reply With Quote
Old 11-29-2005, 07:42 PM   #50
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
OK, here's what you have to do. (You'll probably be sorry you asked. )

Bring up a command window (Start - Run - cmd - <enter>), and change directory to the root of the HelloWorld Eclipse project.

Change your manifest file to look like this:

Manifest-Version: 1.0
Class-Path: hme-host-sample.jar hme.jar
Main-Class: com.tivo.hme.host.sample.Main


Save the file as mymanifest in that same directory.

Copy the hme.jar and hme-host-sample.jar files from the SDK into this directory as well.

Run the following command to create the JAR:

jar cvfm HelloWorld.jar mymanifest com\tivo\hme\HelloWorld.class

(jar.exe may be found in the bin directory of your Java SDK, e.g. C:\j2sdk1.4.2_07\bin, if it's not in your PATH)

Run the JAR using this command:

java -jar HelloWorld.jar com.tivo.hme.HelloWorld

You should get the telltale output letting you know it's running:

HME SDK 1.4 (TiVo, Inc.)
LOG: added factory
MDNS: http://192.168.1.100:1412/hme/


Simple, huh?
F8ster is offline   Reply With Quote
Old 11-30-2005, 10:44 AM   #51
RedMan8
Registered User
 
Join Date: Sep 2005
Posts: 176
I knew it would be messy, but that's just what I was looking for!
I'll give it a try when I get home, but it sounds perfect.

Thanks (again) F8ster!

--Edit--

It works it works!!
I added a little .bat file with the java command so I can just double-click to run it now.

WOO HOO!

--End of Edit--

Last edited by RedMan8 : 11-30-2005 at 11:46 AM.
RedMan8 is offline   Reply With Quote
Old 01-01-2006, 03:13 PM   #52
trovan
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks for the info. HelloWorld is working here.

Trovan
trovan is offline   Reply With Quote
Old 03-03-2006, 04:09 PM   #53
jackreacher
Registered User
 
Join Date: Feb 2006
Posts: 1
Got HelloWorld here as well. Thanks very much for the flash example.

I would like to emphasize someone else's tip concerning users on vpn, etc. My first attempt didn't bind to my ip so added the following in the arguments window:
Code:
com.tivo.hme.HelloWorld
--intf 192.168.1.8
...with the ip of the machine running the java app. Worked fine then.
jackreacher is offline   Reply With Quote
Old 03-29-2006, 09:18 PM   #54
kpm3102
Registered User
 
Join Date: Mar 2006
Posts: 1
How to make Hello World run with Java Web Start?

Thanks for this tutorial...it's been a HUGE help. I am wondering how to make the Hello World app run using Java Web Start?
kpm3102 is offline   Reply With Quote
Old 04-09-2006, 05:58 PM   #55
mondelicious
Registered User
 
Join Date: Jul 2005
Posts: 29
Hello, all.

First things first. Tremendous thanks to F8ster. I found your tutorials on bitrazor before coming here, and they were invaluable in getting me started with hme development.

I have had some measure of success in getting my app running, even though this is my first java project.

I have so far been able to run my app in the simulator and using the com.tivo.hme.host.sample.Main class from the Run menu within Eclipse. I am having trouble figuring out how to export a jar that will run standalone.

I am developing on a mac, running OS X 10.4.6, using Eclipse 3.1.1.

I am hoping to export either a double-clickable jar or an application bundle.

Thanks,
mondelicious
mondelicious is offline   Reply With Quote
Old 04-10-2006, 01:29 AM   #56
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
Quote:
Originally Posted by mondelicious
Hello, all.

First things first. Tremendous thanks to F8ster. I found your tutorials on bitrazor before coming here, and they were invaluable in getting me started with hme development.

I have had some measure of success in getting my app running, even though this is my first java project.

I have so far been able to run my app in the simulator and using the com.tivo.hme.host.sample.Main class from the Run menu within Eclipse. I am having trouble figuring out how to export a jar that will run standalone.

I am developing on a mac, running OS X 10.4.6, using Eclipse 3.1.1.

I am hoping to export either a double-clickable jar or an application bundle.

Thanks,
mondelicious
Thanks for the kind words. Makes it worth the effort...

It is possible to do what you're attempting, although it's painful. Here are the basic steps:
  • Extract everything from each JAR in your app into a directory. Use 'jar xvf hme.jar', for example, to extract everything from hme.jar into an expanded directory. Repeat for each JAR in your application.
  • Create a new manifest with Main-class: set to the class containing your main. Call it 'mymanifest'. See a few responses up (this one) in this thread for a syntax example. Put it in the same dir. you're expanding all of this stuff into.
  • Use 'jar cvfm my_big_jar.jar dir/mymanifest dir/*' to wrap it all up into a new JAR.
  • You can then do 'java -jar my_big_jar.jar' to run it, or double-click the JAR.

I'll try to test this with HelloWorld just to make sure I'm not giving you bad info here, but this should get you pointed in the right direction. Here's some links from Sun to help:

http://java.sun.com/docs/books/tutor...sicsindex.html
http://java.sun.com/docs/books/tutor...jar/build.html
http://java.sun.com/docs/books/tutor...jar/index.html

There's gotta be some software package that'll automate this for you, but I've yet to run across one. Once you get it working, it should be fairly scriptable, though.
F8ster is offline   Reply With Quote
Old 04-10-2006, 02:10 AM   #57
mondelicious
Registered User
 
Join Date: Jul 2005
Posts: 29
eep!

Thanks for the info. I was really hoping it would be a matter of choosing the right options in the Eclipse export wizard. Ah well....

I guess I'll have to study a bit.

Thanks.
mondelicious
mondelicious is offline   Reply With Quote
Old 04-10-2006, 02:52 AM   #58
mondelicious
Registered User
 
Join Date: Jul 2005
Posts: 29
I've made a bit of progress.

I extracted the hme and sample hosting jars, as well as my own app. Then, I used a manifest file pointing to com.tivo.hme.host.sample.Main as an entry point and followed your directions for creating a big jar.

This seems to have gotten me to the point where a Main class is actually found, but I am missing the argument for the main class.

null null (null)
com.tivo.hme.interfaces.IArgumentList$BadArgumentException: missing argument
at com.tivo.hme.host.util.ArgumentList.shift(ArgumentList.java: 130)
at com.tivo.hme.host.sample.Main.createFactory(Main.java:382)
at com.tivo.hme.host.sample.Main.<init>(Main.java:151)
at com.tivo.hme.host.sample.Main.<init>(Main.java:60)
at com.tivo.hme.host.sample.Main.main(Main.java:534)
error: missing argument
usage: Main [options] class

Options:
--port <port> listen on a specific port
--intf <interface> listen on a specific interface
--nomdns <interface> listen on a specific interface, without mdns
--launcher <file> start factories listed in file
--jars <dir> scan directory for HME app jar files
--jar <jarfile> start factory for the given jar

I can't figure out where to put this argument, which I'm assuming will be the jar name.

Am I on the right track?

mondelicious
mondelicious is offline   Reply With Quote
Old 04-10-2006, 09:59 PM   #59
F8ster
The Very Last One
 
F8ster's Avatar
 
Join Date: May 2002
Posts: 232
Yep, this is what I found as well. The argument appears to be accepted only on the command line, e.g.

java -jar my_big_jar.jar com.tivo.hme.HelloWorld

This is one of the reasons I use exe4j to wrap my Java apps in a Windows .exe (doesn't do you any good on a Mac, I know). You might also look at Java Web Start, and the Duck Creek JNLP wrapper for it.

FWIW, here's the script I include with the NetFlix RSS Reader to run my app. Notice that I don't even fight with trying to combine the jars; I just stick them all in a 'jars' directory (although I suppose 'lib' would be more conventional) and the script adds them one by one. Some kind soul contributed this script:

Code:
#!/bin/bash

for jar in $(ls -1 jars); do
if [ -z $classpath ]; then
classpath="jars/$jar"
else
classpath="$classpath:jars/$jar"
fi
done

echo $classpath

java -cp $classpath com.tivo.hme.host.sample.Main com.bitrazor.netflixrss.NetFlixRSS

F8ster is offline   Reply With Quote
Old 04-11-2006, 02:40 PM   #60
mbalgeman
Bagel Man
 
mbalgeman's Avatar
 
Join Date: Feb 2002
Posts: 539
Since I've just started working with Eclipse for work projects, I've noticed that there seems to be a plugin for everything. So when I ran across this thread and read the new replies I thought, "I bet there's a plugin for that!!!". Sure enough...

http://fjep.sourceforge.net/

I make no claims that it does everything you want or actually works, but it might be worth a look.
mbalgeman is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 04:09 AM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |