Skip to main content

How to build KVM with KNI capabilities

2 replies [Last post]
Joined: 2008-06-27

Hi All
I am new to J2ME,need some guidance to compile kvm with KNI capabilities...

I have compiled phoneMe feature software on Linux for ARM.
i am trying to add native functions in java file,but i didnt find any docs for this.
my questions are:
1)Do i need to download any thing other than phoneMe software for building KVM with KNI capabilities
2) where i need to store the JAVA source file which native methods and C file which has native methods implementations(like which dir we need to store it)
3)Do i need to modify any make file or any such file for this.


Message was edited by: aravind_rj

Message was edited by: aravind_rj

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-09-22


You don't need to download anything for using your own KNI function implementation.
If you are adding your own Java files which are going to make calls to native functions in that case you will have to modify some make files. phoneME source code has plenty of examples which are quite self explanatory.
The general source organization of phoneME is :
//src//reference -- This contains native implementation
//src//classes -- This contains your java implementation
//src//i3test --- This contains native test cases

So if you add new files you will have add their entries in various gmk files. subsystem.gmk describes that particular subsystem. You will have add entry of Java/C files into module specific gmk files.

As you might be knowing KNI function names have specific naming convention i.e Java_

Hope this helps.


Joined: 2008-06-27

thanks tushar...
your answer helped a lot... as i never worked on makefile before,i am finding very difficult to understand make file(lots of makefiles).Is there any doc which gives exacts steps to do this, what all the makefiles we need to modify and where... etc with examples.... that will be very helpful to me


Message was edited by: aravind_rj