MathGroup Archive 2001

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

Search the Archive

Re: Urgent Message Link --- Sample J/Link Projects

  • To: mathgroup at
  • Subject: [mg28723] Re: Urgent Message Link --- Sample J/Link Projects
  • From: tgayley at (Todd Gayley)
  • Date: Thu, 10 May 2001 07:55:10 -0400 (EDT)
  • Organization: Wolfram Research, Inc.
  • References: <9d85ql$>
  • Sender: owner-wri-mathgroup at


The problem is that an IllegalAccessException is being thrown when your message handler
function is called, because your MyMessageHandler class is not public. To fix this, just
stick the 'public' keyword in front it (you can still leave it as an inner class). This
does not cause a problem in Java 1.2 and later, but Mac OS 9 is stuck at Java 1.1, so this
is the only platform on which a problem occurs with your code.

--Todd Gayley
Wolfram Research

On 8 May 2001 03:04:53 -0400, "Junzo Sato" <jsato at> wrote:

>Dear J/Link programmers in MathGroup,
>I'm now trying to understand how an urgent message link for a mathlink is
>treated in J/Link.
>But it seems something different with c/c++ programming.
>Will you try my jlinkprograms to see what's wrong with messageReady(),
>getMessage(), and putMessage() or 
>a custom message handler used by addMessageHandler() ?
>Java source code and CW6 projects are available at my web site.
>To extract the archive on Mac/Win, the StuffIt Expander from
> is required.
>Three programs I wrote in java are as follows.
>[1] MyKernelLinker
>This application is based on Todd's JLinkUserGuide Part2.
>It launches MathKernel.
>Putting message MathLink.MLABORTMESSAGE does work.
>[2] JavaSnooper
>This applications relays packets between mathematica frontend and math
>It can't pass abort message.
>[3] MathLinkTerminal
>This application uses only the class MathLink.
>Only one method put(String str) is used to send a string like a chat
>Urgent message is not detected.
>Thank you for your help :-)
>Junzo SATO
>Email: jsato at
>Department Of Medical Information Technology
>Kumamoto University Hospital
>University Of Kumamoto
>1-1-1 Honjo, Kumamoto City,
>Kumamoto, 860-8556, JAPAN

  • Prev by Date: Re: list of bits to string
  • Next by Date: Re: Re: ScatterPlot3D/Plot3D
  • Previous by thread: Urgent Message Link --- Sample J/Link Projects
  • Next by thread: Re: A tough Integral