MathGroup Archive 2000

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

Search the Archive

Re: Re: mathlink

  • To: mathgroup at
  • Subject: [mg25202] Re: [mg24971] Re: [mg24957] mathlink
  • From: tgayley at (Todd Gayley)
  • Date: Fri, 15 Sep 2000 02:21:41 -0400 (EDT)
  • Organization: Wolfram Research, Inc.
  • References: <> <HeUr5.3627$>
  • Sender: owner-wri-mathgroup at

On Fri, 01 Sep 2000 20:23:03 GMT, Christopher Lee French
<clfrench at> wrote:

>There is a  filename.c library of custom functions at my work that I would like to
>access using Mathematica. What is your method for calling c functions using J/Link? I have
>J/Link and I can get 50% of the examples to run on my PC. Is there any hope for me
>of this being easy?
>Chris French


The reason some of the J/Link examples are not working for you is that
they use the Swing GUI library. You are using the Microsoft Java
runtime, which does not include Swing. I think you'll find that if you
install Sun's Java runtime
(, all the
examples will work fine.

I would not recommend using J/Link to call C functions. J/Link makes
it trivial to call Java functions from Mathematica, but to call C
functions you'd have to write stub C code that wrestles with the Java
Native Interface (JNI), which is at least as complex as dealing with
raw MathLink from C. You are probably better off just using the
standard "template" mechanism for accessing C functions from
Mathematica via MathLink.


Todd Gayley
Wolfram Research

  • Prev by Date: Re: writing mathematica script files for the math kernel under linux
  • Next by Date: Re: Amazing backgrounds
  • Previous by thread: mathlink
  • Next by thread: ButtonBox, styles, GraphicsGenerator.nb