Hi Gregg,


You could read the attached doc for JNI binding on Android.

I am reading it and trying to expose more core sdk function to Java layer, for 
example OCDoResource()



A related question.

I have tried Petre?s code 7895, it compiles ok, but I remember I don?t see any 
.jar, maybe I am doing something wrong, will try again.

Maybe the SimpleClient does not use main() as entry point, try to tell java 
what class/method to run as starting point. I could do this in Eclipse.



From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Gregg Reynolds
Sent: Wednesday, June 15, 2016 12:54 AM
To: iotivity-dev
Subject: [dev] Java on Darwin available (but: need help running samples)



https://github.com/iotivation/iotivity/



Instructions are on the Readme.  



Special thanks to Petre Eftime, whose 
https://gerrit.iotivity.org/gerrit/#/c/7895/ forms the basis of the 
implementation.  Everything seems to compile ok but I have not figured out how 
to get the samples (just simpleclient and simpleserver so far) to run.  I've 
tried everything I can think of but I always get this:



Error: Could not find or load main class org.iotivity.base.examples.SimpleClient



See bin/j for an example.  I've not dealt with Jni before; if anybody can offer 
guidance on issues like how to get the sample running, how to package the whole 
thing into a jar, etc. I would be grateful.



The code seems to run ok on darwin, but I've fallen behind a bit on running it 
against Linux, so it might break there.  But that's ok, because it will be 
submitted in small patches.

The Darwin port does not require the kind of major surgery that Windows 
undoubtedly did, so for the most part it can be broken into small pieces.  I've 
started submitting them (e.g. https://gerrit.iotivity.org/gerrit/#/c/8461/, 
https://gerrit.iotivity.org/gerrit/#/c/8603/, 
https://gerrit.iotivity.org/gerrit/#/c/8477/) and will provide a summary once 
they're all ready.



You can see an earlier version of the changes at 
https://gerrit.iotivity.org/gerrit/#/c/8531/ (thanks to the reviewers who've 
commented on that, I'll apply recommendations to the chunks)



Cheers,



Gregg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160615/c29fd0f1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IoTivityAndroidBinding.pdf
Type: application/pdf
Size: 1281872 bytes
Desc: not available
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160615/c29fd0f1/attachment.pdf>

Reply via email to