MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why use Java in Mathematica?

  • To: mathgroup at
  • Subject: [mg78350] Re: [mg78191] Why use Java in Mathematica?
  • From: Todd Gayley <tgayley at>
  • Date: Thu, 28 Jun 2007 06:36:39 -0400 (EDT)
  • References: <>

At 06:04 AM 6/25/2007, =?GB2312?B?wPfV/byq?= wrote:
>Dear all,
>I have tried V6.0, and find that whenever kernel starts, JavaLink is
>loaded. By inspecting javaw.exe's running status, it can be found that
>Java is started for PacletManager.
>Even disallow Mathematica to access Internet, PacletManager is loaded
>at start up as usual. I find that the loading of PacletManager is coded
>into, so it seems difficult to get rid of PacletManager.
>Since I do not need PacletManager currently, so I modified
>PacletManager.m to create the PacletManager` contex only and do
>nothing else. Then Java is no longer loaded at start up of kernel.
>Personally, I hate Java:
>1. JRE uses two much memory, and >50MB for PacletManager
>2. for personal taste.
>Personally, I think that JavaLink is great feature to show that
>Mathematica is open, and can interact with other programming
>languages. But it is not a good thing to make JavaLink a required
>component to Mathematica. (Some functions need Java)
>The reason for using Java in Mathematica is only for Internet access.
>And remind that some other scientific computing software (such as
>..... as you know) even use Java for building their user
>interface! Mathematica is immaculate in most part of the kernel and
>user interface. But still, I wonder why using Java, as a required
>I suppose that WRI just want to make the codes related to Internet
>access cross-platform. WRI has already made both the frontend and
>kernel cross-platform, why not implement Internet accessing functions
>on different platform NATIVELY?

I'm glad I didn't jump right in on this thread because many of the 
things I wanted to say were already said well by others.

Java is used for a number of things in Mathematica. Here is a 
reasonably complete list:

    - all kinds of Internet access, including Import from URLs and 
the WebServices package
    - database access (the DatabaseLink application)
    - the new "data collections" feature (e.g., CountryData, ElementData, etc.)
    - quite a few Import/Export formats
    - some Date-related kernel functionality
    - some Sound-related kernel functionality
    - the PacletManager, a new component in version 6
    - bundled add-ons like GUIKit and EquationTrekker
    - commercial and freeware add-ons like the Digital Image 
Processing package and the SuperWidgetPackage
    - user-written J/Link code, of which there is a huge amount

The basic reason why Java is used for these things is, of course, 
because it lets us bring some great new features into Mathematica 
faster and more robustly than by any other means.

David Bailey already addressed the memory issue, and I have made 
remarks about it in other MathGroup threads. The Java runtime does 
use a significant amount of memory, although the amount goes up and 
down depending on the whims of the garbage collector. The actual 
footprint of live Java objects is usually less than the memory usage 
reported by the operating system. The PacletManager itself does not 
use a large amount of RAM.

Todd Gayley
Wolfram Research

  • Prev by Date: Re: Power Spectrum 2D field
  • Next by Date: Re: Why use Java in Mathematica?
  • Previous by thread: Re: Re: Why use Java in Mathematica?
  • Next by thread: Re: Why use Java in Mathematica?