MathGroup Archive 2006

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

Search the Archive

Re: MathematicaTask.java

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69592] Re: MathematicaTask.java
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sat, 16 Sep 2006 03:50:43 -0400 (EDT)
  • References: <acbec1a40609151051l13e81d3dx3c9b68eb99f91291@mail.gmail.com>

I must sheepishly admit:
Properly setting JAVA_HOME (I thought I did, but I was wrong) removes
all of the errors except for not finding tools.jar - I still haven't
solved that.

Unable to locate tools.jar. Expected to find it in C:\Program
Files\Java\jre1.5.0_06\lib\tools.jar

On 9/15/06, Chris Chiasson <chris at chiasson.name> wrote:
> Hi, I am trying to use the ant task that ships with Mathematica. When
> I use the Java Runtime Environment that ships with Mathematica, the
> build succeeds. However, this is not something I want to depend upon,
> because my real build is meant to do other things in addition to
> running Mathematica code:
>
> C:\Documents and Settings\Chris\Desktop>"C:\Program Files\ant\apache-ant-1.6.5\b
> in\ant.bat"
> Buildfile: build.xml
>
> all:
>      [echo] 0
>      [echo] 1
>      [echo] 4
>      [echo] 9
>      [echo] 16
>      [echo] 25
>      [echo] 36
>      [echo] 49
>      [echo] 64
>      [echo] 81
>
> BUILD SUCCESSFUL
> Total time: 1 second
>
> When I use Sun's standard jre1.5.0_06 (aka Java 5), the build fails
> with a lot of errors:
>
> C:\Documents and Settings\Chris\Desktop>"C:\Program Files\ant\apache-ant-1.6.5\b
> in\ant.bat"
> Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.
> 0_06\lib\tools.jar
> Buildfile: build.xml
>
> all:
> [mathematica] Fatal error: cannot find the required native library named JLinkNa
> tiveLibrary.
>
> BUILD FAILED
> java.lang.UnsatisfiedLinkError: MLOpen
>
> Total time: 1 second
>
> The output doesn't show it, but a dialog box also pops up saying it
> can't find jawt.dll.
>
> Here is the source code for the build:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="Website Build" default="all">
>         <property environment="env"/>
>   <taskdef name="mathematica"
>            classname="com.wolfram.jlink.util.MathematicaTask"
>         classpath="C:\Program Files\Wolfram
> Research\Mathematica\5.2\AddOns\JLink\JLink.jar"/>
>   <target name="all">
>         <mathematica exe="C:\Program Files\Wolfram
> Research\Mathematica\5.2\MathKernel">
>       <![CDATA[
> For[i=0,i<10,i++,echo=Ant["project"]@createTask["echo"];echo@setMessage[ToString[i^2]];echo@perform[]]
>       ]]>
>     </mathematica>
>   </target>
> </project>
>
> If you will, please tell me how I can use the MathematicaTask (look
> for MathematicaTask.java inside the Mathematica distribution) with a
> standard Java Runtime Environment. (I recommend testing with the
> version that doesn't work first. The version that does work appears to
> be "sticky" (on Windows anyway) - and no, I don't know how to be more
> definite than that.)
>
>
>
> --
> http://chris.chiasson.name/
>


-- 
http://chris.chiasson.name/


  • Prev by Date: MathematicaTask.java
  • Next by Date: Re: Why is the negative root?
  • Previous by thread: MathematicaTask.java
  • Next by thread: function's local constants interdependence