Tag Archive: java


As you already know, the allocated memory to an application is only 6MB ~ 7MB on Set-top box. Unfortunately, we can not set the heap size for each xlet application at the runtime like  desktop or server applications. Therefore, with limited memory we should be careful of loading large images from remote server that causes it easily to an “Out of Memory” exception on the Set-top box.

See the following demo. For each image, the size is about 300KB ~ 500KB.

Wow, it’s so incredible! How it works without an memory exception?? It works also with VOD playing at the same time.  And we do not need to resize images to download from server side.

The following is a local batch file of some server.

It is really hard to locate *.jar libraries to %CLASSPATH%. But, I found the solution from here. Thank you very much, bryancelyn!

- Sample

@echo off
echo ************************************************
echo * Server on Windows
echo *
echo * (xpirator@2009.06.19)
echo ************************************************

SETLOCAL

if NOT DEFINED IPTV_HOME set IPTV_HOME=%CD%
if NOT DEFINED IPTV_MAINCLASS set IPTV_MAINCLASS=com.xpirator.iptv.Server
if NOT DEFINED JAVA_HOME goto err

REM JAVA options
REM You can set JAVA_OPTS to add additional options if you want

set JAVA_OPTS=-server -Xms128m -Xmx512M

REM setting classpath
REM -----------------------

subst M: %IPTV_HOME%\lib
M:

REM cd %IPTV_HOME%\lib
set CLASSPATH=M:\

for %%i in (*.jar) do call :append %%i
goto okClasspath

:append
set CLASSPATH=%CLASSPATH%;M:\%*
goto :eof

:okClasspath
set IPTV_CLASSPATH=%IPTV_HOME%;%CLASSPATH%;%IPTV_HOME%\iCOD-Server.jar
goto launchServer

:launchServer
echo Starting Server
"%JAVA_HOME%\bin\java" %JAVA_OPTS% -cp "%IPTV_CLASSPATH%" "%IPTV_MAINCLASS%"
goto finally

:err
echo JAVA_HOME environment variable not set! Take a look at the readme.
pause

:finally

ENDLOCAL

Follow

Get every new post delivered to your Inbox.