Negative

Juan Jose Comellas jcomellas at gmail.com
Fri Mar 3 08:26:00 PST 2006


Andrew Fedoniouk wrote:

>>
>> Java launched for 3 reasons(outside of Suns marketing), IMO:
>>
>> 1. Server side web programming was just taking off. This was Java's
>> killer
>> app.  Case in point: Flash does most interactive embedded stuff today in
>> web pages.
>>
>> 2. No pointers. No memory leaks eliminates large classes of errors. Even
>> though it existed in other languages, coupled with #1 this made Java a
>> much better C++.
>>
>> 3. A comprehensive set of tools and a company willing to support them. In
>> getting business to adopt your tech they need support and Sun delivers(at
>> least on Solaris and Win32 initially).
>>
> 
> 4. Execution model: VM + real GC. Safe sandbox. Pure byte code cannot GPF
> in principle.
> 
> 5. Extremely simple Java Native Interface mechanism - bridge to native
> code for
> mission crititcal pieces.

I beg to differ here. I've worked on several projects on Linux that use JNI
extensively and it's anything but easy to use. It may work for simple
cases, but it has all kinds of quirks and it's unnecessarily verbose. Every
JVM has its JNI functions in different libraries, so there's no hope of
simple portability between them. To top it all, just try to embed the JVM
inside a process that uses threads and Unix signals to see what "all hell
breaks loose" really means.

I think the guy who designed JNI really didn't want it to be used.



More information about the Digitalmars-d mailing list