Skip to main content

Externally created .class from Eclipse

5 replies [Last post]
abhi_h
Offline
Joined: 2012-04-23

I am facing one error while pasting my externally created .class files in the OCAP-RI class path which is to be executed by the OCAP-RI Emulator from cmd. The TuneTest application doesn't loads then whereas when i use the built in .class file of TuneTest project, it loads.
what can be the possible error in my case?Do I need any additional permissions to do so?

Also can I make a .jar executable file of Xlets like we make of .java files as creation of .jar requires a main()...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mkorzen
Offline
Joined: 2008-03-05

Hello -

When you compile an OCAP application using Eclipse, make sure that the generated byte code compatibility is set to 1.4. Anything earlier should work as well but 5.0 and older version of byte code will not run on the phoneME JVM.

Hope this helps -
Marcin

abhi_h
Offline
Joined: 2012-04-23

Thanks mkorzen for your reply, but I'm using java 1.4 only and also i'll tell u about what i'm exactly doing,
1. Installed OCAP-RI on D: drive, current path of runRI.bat(D:\OCAP-RI\ocap ri\)
2. Located mpeenv.ini file at D:\OCAP-RI\ocap-ri\ocap\bin\CableLabs\simulator\Win32\debug\env location and opened it and added 'usr' directory in the class-path to locate hostapp.properties file :
# App class-paths
VMOPT.0=-Djava.class.path=/syscwd/usr/;
3. Copied hostapp properties, config.properties and the complete .class files from my Eclipse project of TuneTest (as given step by step on https://community.cablelabs.com/wiki/display/OCORI/Using+Tunetest+to+ver...)
4. The changed hostapp.properties has location of .class file compiled from Eclipse::
app.0.base_directory=usr/xlet/ (changed from qa/xlet to usr/xlet)
app.0.initial_class_name=bin.org.cablelabs.xlet.TuneTest.TuneTestXlet
5. Now when I run runRI.bat file from cmd , it gives an errors :
ERROR RI.Stack - 19234 [ThreadPool-App 0x15204-1] ERROR security.Policy - PRF failed authentication! -- /syscwd/usr/xlet/bin/org/cablelabs/xlet/TuneTest/ocap.TuneTestXlet.perm
ERROR RI.Stack - 19297 [ThreadPool-App 0x15204-1] ERROR security.Policy - PRF failed authentication! -- /syscwd/usr/xlet/bin/org/cablelabs/xlet/TuneTest/dvb.TuneTestXlet.perm
6. In case I don't change any of class-path in mpeenv.ini file and base_directory of hostapp.properties, the TuneTestXlet application works properly.
7. What can be the possible error ?? Please help me with this one, stuck with this since 10 days...

Thank You

mkorzen
Offline
Joined: 2008-03-05

Can you please double check the following:

2. /syscwd/usr directory is already present in the classpath list in mpeenv.ini. I don't think there is a need to add it again. Also, if that path was added, did it replace the existing string (that's bad) or did it append to it?

4. If your initial class name is "bin.org.cablelabs.xlet.TuneTest.TuneTestXlet" - does your TuneTest reside in the "bin.org.cablelabs.xlet.TuneTest" package? Or is it "org.cablelabs.xlet.TuneTest" package?

abhi_h
Offline
Joined: 2012-04-23

Hi mkorzen,

Actually what u told me , i checked and it is all right.

In my case, the package where the .class file of a particular .java file is created in Eclipse should be in the same where the .class file is placed in the OCAP-RI folder which should again be the same in the hostapp.properties file.
I got it working but initially didn't showed any video and gave error- No channel map found.

Then in the config.properties file, we have to keep the variable "use_java_tv_map = false" which is not the case in running the same application in Eclipse. (there, we set "use_java_tv_map = true")

Thanks for the replies. Might need your help ahead in trying out some other stuff.

mkorzen
Offline
Joined: 2008-03-05

No problem. Glad that you were able to resolve your issue.
Best -
Marcin