IntelliJ Java IDE
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Disadvantages of JNI Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Architect Certification (SCEA/OCMJEA)
Reply Bookmark "Disadvantages of JNI" Watch "Disadvantages of JNI" New topic
Author

Disadvantages of JNI

Shankar Ranganathan
Ranch Hand

Joined: Sep 19, 2001
Posts: 71
When JNI can't be used? Can you give me an example
Shankar


Shankar<br />Post mock questions in<br /><a href="http://groups.yahoo.com/group/scea_mock" target="_blank" rel="nofollow">http://groups.yahoo.com/group/scea_mock</a>
Claudio Malso
Ranch Hand

Joined: Nov 05, 2002
Posts: 50
In my point of view, of you use JNI:
- You can’t say write once run anywhere.
- Difficult to debug runtime error in native code.
- Security risk.


Claudio
Shankar Ranganathan
Ranch Hand

Joined: Sep 19, 2001
Posts: 71
Hi Roger,
Thanks for your time.
In the implementation of JNI does the existing system to be IN-PROCESS. I took this from
serverside.com.Can someone explain this scenario.
Exact Info from serverside:
The Java Native Interface (JNI). JNI enables you to bridge into native code, such as C++ code. The advantage of the JNI is that it's faster than the other approaches. The disadvantages are that it can't connect to any system (just native code), the existing system needs to run in-process, and JNI is platform-specific--so if your code needs to run on multiple platforms you.re multiplying the testing and maintenance effort.
Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116
Simply put - if your C++ code dumps core, your JVM will crash.
Rama
 
IntelliJ Java IDE
 
subject: Disadvantages of JNI
 
Threads others viewed
java and c++
Can java access Windows "file-properties-summary" ?
Updating windows registry variables using Java program
add any application to the Context Menu when you right click on any Folder
WA #1.....word association
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture