# Trouble wiith simulator on Linux



## flubbard (Dec 3, 2008)

I am just starting to play with HME development and am trying to get the Hello World application to run through the simulator. No problem on my Windows machine but will not run under Linux (Fedora).

When I run

```
java -cp simulator.jar:samples/samples.jar com.tivo.hme.sim.Simulator com.tivo.hme.samples.hello.HelloWorld
```
I get

```
LOG: added factory
MDNS: http://192.168.122.1:7288/hello/
Exception in thread "main" java.lang.NullPointerException
   at com.tivo.hme.sim.Simulator$AddressPane$ListModel.insertElementAt(Simulator.java:1035)
   at com.tivo.hme.sim.Simulator$AddressPane$ListModel.addElement(Simulator.java:1023)
   at javax.swing.JComboBox.addItem(libgcj.so.7rh)
   at com.tivo.hme.sim.Simulator$AddressPane.setText(Simulator.java:931)
   at com.tivo.hme.sim.Simulator.setURL(Simulator.java:517)
   at com.tivo.hme.sim.Simulator.run(Simulator.java:530)
   at com.tivo.hme.sim.Simulator.main(Simulator.java:860)
```
I don't think it's an IPv6 problem, though I did disable it just to be sure. 
I do not understand why it is using the server address that it has. This is not the correct address for the local machine. Could this be causing my problem. If so, where is the host being grabbed from and how can I correct it.

Any help would be appreciated.

Thanks, 
Flub


----------



## mhd78 (Oct 17, 2007)

I believe it has trouble detecting the interface to use on linux, so you can specify it on the command line with the --intf option. e.g. if the interface you want it to use is 192.168.1.100, you would invoke it like this:

java -cp simulator.jar:samples/samples.jar com.tivo.hme.sim.Simulator --intf 192.168.1.100 com.tivo.hme.samples.hello.HelloWorld


----------



## flubbard (Dec 3, 2008)

When I force the interface I still get the same message (with the obvious difference that I now have my main interface in the MDNS line. When this runs, it appears to temporarily bring up the simulator before crashing.


----------



## wmcbrine (Aug 2, 2003)

I had decided not to comment on this when it was first posted, because although I do use the simulator, I develop with my own Python library rather than TiVo's Java SDK. But perhaps this will help, after all: I start the simulator with "java -jar simulator.jar". Then I start the apps separately (e.g., "./start.py" or "./runsamples.sh"), and connect either via the pull-down "Applications" menu, or by typing the URL (not normally needed, but I sometimes hit Enter in the URL bar once it's already populated rather than go back to the menu). If it's my first time running it, I have to select the correct interface from the menus (the LAN interface rather than localhost) before "Applications" will work.


----------

