Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Reading Results from J/Link

  • To: mathgroup at
  • Subject: [mg65212] Reading Results from J/Link
  • From: Isam Haddad <i.haddad at>
  • Date: Sat, 18 Mar 2006 06:40:34 -0500 (EST)
  • Organization: TU Braunschweig, Germany
  • Sender: owner-wri-mathgroup at


I'm doing first steps with J/Link and have problems to understand how to 
treat results coming from the Mathematica-kernel to Java.

Lets say I have an *.m-File looking like this

   x[a_,b_]:=( {b*a, b} );

and I call it from Java by executing

   Expr e = new Expr( new int[]{1,2,3} );
   Expr p = new Expr( new Expr(Expr.SYMBOL, "x"),
                      new Expr[]{ e, new Expr(2) } );


The Mathematica-result should be { {2, 4, 6}, 2 }.

What I don't understand how to translate this result to Java. 
Additionally ml.getType() returns 70. But this code is none of the 
declared ones in the MathLink-interface.

Can anybody help me?

Thanks in advance

  • Prev by Date: Combined Graphics3D with Separate PlotRange?
  • Next by Date: Size of .mx files
  • Previous by thread: Re: Combined Graphics3D with Separate PlotRange?
  • Next by thread: Re: Reading Results from J/Link