Re: Help me!! Why java is so popular



raddog58c wrote:
For instance, someone was asking me about checking for an already-
running instance of a program on a Windows workstation. That's a
really easy thing to implement in any language that can talk directly
to the OS -- about 15 lines of code invoking EnumWindows.
If we are talking about arbitrary applications then that only works for applications that actually have a window.


You can't do that in Java, however, unless you go JNI.
On the other hand if we are talking about testing for an instance of your own application (written in Java) then that is possible without resorting to JNI.


I would say "the penalty is usually pretty small now" is very context
sensitive. Not to pick on you personally, but the general embracing
of the "memory is cheap" or "performance is good enough" is popular in
the Java community, and it's wrong to me. Maybe that's because I use
everything from MASM to IBM 370 BASM to C, C++, Java, VB and Perl, not
sure...

Sometimes the penalty can be zero or even negative, particularly for applications which run long enough to eliminate the startup effects of JIT compiling.

But I would never, or at least rarely, use Java for desktop utilities
I create for myself because the startup time is dreadfully slow, and
the impact on other applications is large. If you're running a system
with a GIG or less of RAM, firing up a memory-hungry JVM isn't
Rubbish. You can do quite a lot of useful work with the JVM 'using' only 8MB or less which is trivial in the context of 1GB memory. I've been running a service, written in Java, which has no noticeable effect on the responsiveness of my normal applications. It sits there all day doing its stuff and I can easily forget that it is still running. My machine is a 4 year old 3.06GHz Pentium with 1GB of RAM.

Performance is the biggest drawback to using Java, maybe its only big
drawback, and that's why I'm such a huge opponent against blanket
statements that ignore this side of the Java tradeoff.
Look who is making blanket statements. I care a lot about performance, but I don't have a problem in this respect with Java. Java isn't perfect. For some applications it can be slower than say C++, but in other cases it can be just as fast (or even faster).

Mark Thornton
.



Relevant Pages

  • Re: where do you store app wide data?
    ... Not the JVM.. ... Java applications. ... thats the fault of whoever wrote the application - not Java. ... Files are not stored in RAM when you close them. ...
    (alt.php)
  • Re: Giving an application a window icon in a sensible way
    ... Java app. ... At the time I made the initial posting to this thread, a google ... applications (they involved requesting the icon from a URL, ... or accomplish things on your own. ...
    (comp.lang.java.programmer)
  • Re: Java on VMS
    ... > We are very happy with java on VMS. ... > applications causes problems, ... Mac will often make use of 'resource forks', ...
    (comp.os.vms)
  • Re: How do I prevent a port from installing?
    ... It is quite possible that there are no applications ... that depend on ant for running and at the same time it is likely ... Given that I do not feel I can afford to have Java on the system, ... Dependency: xproto-7.0.10_1 ...
    (freebsd-questions)
  • Re: *Beginner Que* - Servlet - What all do i need on my Comp to run Servlets???
    ... need Java EE SDK or can i just add a Servlet Package to a Java SE SDK ... For running Servlets you need a server like Tomc@ or Jetty. ... An application server to test your J2EE applications. ... I like checking out the Computers at this website for good, ...
    (comp.lang.java.help)