Ok I admit that I like “hello world”.  It’s usually the first thing you run into when you start developing with a new programming language or environment.

So today’s topic is how to show “hello world” in a web application using the emulator bundled with SDK for LG Smart TV.  Currently I’m using Windows7 as my development system and I’m going to start from scratch.

=== Installation ===

1) First I installed JDK for Java SE 6 from here.  Minimum requirement is JRE for Java SE 6, but I chose JDK for possible Java development. ^-^

2) JRE/JDK is a prerequisite for Eclipse.  SDK provides Eclipse plugin for web app development.  So I installed “Eclipse IDE for Java EE Developers”, which I downloaded from here.  I’m not going to use Eclipse for this post but installed it because I will use it later.

3) Now it’s time install SDK for LG Smart TV.  First I downloaded SDK for LG Smart TV from LG developer lounge, http://developer.lgappstv.com.

  • You’ll need to sign up (upper right corner) first, sign in with your login/password, and click “SDK download” icon at upper left corner.  I suggest to get the latest version, v2.0.1.
  • SDK has development environment for both web and Adobe flash.  I’m going to only cover web side unless there are lots of requests to discuss flash development.
  • Details about installation is described in lg smart tv sdk v2.0.1 installation guide.pdf, which you can get from the LG developer lounge, Home->Document->Development Guidelines.

4) Now I need to choose a web server that I can use.  You can skip this step if you have one already.  Since I don’t have one, I installed Apache web server from here.

=== Hello world web app ===

Now it’s time to have some fun.  Let’s show “hello world” on the emulator from SDK.

1) I modified “index.html” for the Apache web server I installed previously to show “hello world” like below.  The index.html existed at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs in my case.  I confirmed my local web server is running correctly by typing “localhost” from my web browser.

<html><body>

<br><h1>Hello world!</h1>

</body></html>

2) Then I started the emulator for LG NetCast 3.0 by clicking the icon named “LG DTV Emulator NetCast 3.0 (2012)” in my desktop.  The icon looks like the following.  Or you can go to windows menu to launch it as well, All Programs->LG Smart TV SDK->Emulator->LG DTV Emulator NetCast 3.0 (2012).

LG TV emulator for NetCast 3.0 (2012)

3) You will see a black TV screen with a remote control on the right side.  First click the power button (upper left corner of remote control) to turn on the TV.

LG emulator screen shot

4) Then click “DTV Emulator” located at upper left corner of the TV screen, and select “Run Browser (Open URL)…” menu.

5) When “Open URL” dialog popped up, I selected “http://localhost&#8221; (or you can type) and hit “GO” button.

Run Browser (Open URL) dialog

6) Then the magic happened.  “Hello world!” finally showed up.

Hello world!

Jae