Skip to main content

OCAP-RI Development

5 replies [Last post]
swati_V
Offline
Joined: 2012-07-09
Points: 0

hi,
m new to the development of ocap ri application. we are trying to call xlet function
from c++ through JNI. but in JNI, it does not worked.
Can anyone give me a way to do this.
thaks in advance!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
swati_V
Offline
Joined: 2012-07-09
Points: 0

hi,
n java, i am using ocap RI Stack classes. i need to create object of ArgParser.java.
this java class , i will be executing thru c ucing JNI.
for JNI, i need .jar files. but i could not find .jar file that will have
access to argparser.java. i tried using ocap-stub.jar, ocap-base.jar etc.
what .jar files i can use?
PFA for hellowolrd.java-->here, i am tying to create object of argparser.java.
thanks in advance!

amirn
Offline
Joined: 2009-05-06
Points: 0

Are you trying to invoke java native methods from an OCAP xlet?
I believe that is no recommended (if not allowed) by the spec.
Invocation of native method from the OCAP xlet execution context in
the stack will probably fail.

Ca you provide sample code of you application and the errors you are getting?

swati_V
Offline
Joined: 2012-07-09
Points: 0

Thnax for the reply.
I am trying to call initXlet() function from c++ thru JNI. JNI works on jar file.
n in OCAP project , we can create .jar file but it does not include features of xlet so we cannot access ocap APIs from JNI.

mkorzen
Offline
Joined: 2008-03-05
Points: 0

Hi - given the scarcity of details, I would suggest a JNI tutorial, such as the following:
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html

Hope this helps -
Marcin

swati_V
Offline
Joined: 2012-07-09
Points: 0

hi,
i have downloaded source code of OCAP consisting of middleware APIs. it has main.c as a stating point. and ri_platform_init() function which starts the platform an then application.
Now i ahve a seperate c project in which i am loading the required .dll file. n i want to call this ri_platform_init() function.
can anyone help me in this ?