Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Q about Wireless Toolkit and native code

Thread view: 
Daniel - 26 Oct 2005 13:32 GMT
Hi all!

Suppose I want to create and distribute a library for use with Sun's
wireless toolkit. The library consists of a number of Java classes and
a DLL containing some native code. Is this possible at all? I know of
the following problems:

* The KVM doesn't support JNI. However, my understanding is that the
emulator in WTK uses the J2SE VM, so it should be possible anyway.

* The preverifier fails for classes using native declarations. But
mustn't the WTK itself use some native code? And there should be no
reason for this code to be pre-verified as it's runnning in the J2SE
VM. Correct? The question is, how can I add this kind of code to the
WTK?

I hope I'm making myself understood. :) Any help or thoughts about this
would be very appreciated. Thanks in advance!

/Daniel
Roedy Green - 27 Oct 2005 01:00 GMT
>* The preverifier fails for classes using native declarations. But
>mustn't the WTK itself use some native code?

JNI is more than just native classes. It is a library of methods you
can call from C.  It is the javah utility. It is a set of C headers.
It is a bunch of glue for hooking up JNI.  I would hope the built-in
native classes go through a more efficient mechanism than JNI that
does not require runtime hookup.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Darryl L. Pierce - 27 Oct 2005 12:38 GMT
> Suppose I want to create and distribute a library for use with Sun's
> wireless toolkit. The library consists of a number of Java classes and
> a DLL containing some native code. Is this possible at all?

Why not just use the MIDP reference implementation, which comes with
source code and which can be used (once you've licensed it) to make a
customized MIDP environment as you're desiring.

Signature

Darryl L. Pierce <mcpierce@gmail.com>
Homepage: http://mcpierce.multiply.com/
"Bury me next to my wife. Nothing too fancy..." - Ulysses S. Grant



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.