Difference between revisions of "VasCalc - Progress Log"

From Drorbn
Jump to: navigation, search
Line 2: Line 2:
 
==== Thursday May 11 20006====
 
==== Thursday May 11 20006====
 
* First day meeting's blackboard: [[Image:060511-1.jpg|thumb|160px|left]]
 
* First day meeting's blackboard: [[Image:060511-1.jpg|thumb|160px|left]]
 +
<br clear="all">
 
==== Sunday May 14 2006====
 
==== Sunday May 14 2006====
 
J/Link passed the Hello World test. The java class and Mathematica
 
J/Link passed the Hello World test. The java class and Mathematica
Line 18: Line 19:
 
Another slightly different HelloWorld test has been added to the [http://katlas.math.toronto.edu/svn/VasCalc/trunk/  SVN repository]. This time, one can use the default Java runtime bundled with Mathematica/Windows (so the user does not need to know anything about where Java lives on their system) by telling the Java compiler to produce code for Java 1.4. This is accomplished by issuing the command:
 
Another slightly different HelloWorld test has been added to the [http://katlas.math.toronto.edu/svn/VasCalc/trunk/  SVN repository]. This time, one can use the default Java runtime bundled with Mathematica/Windows (so the user does not need to know anything about where Java lives on their system) by telling the Java compiler to produce code for Java 1.4. This is accomplished by issuing the command:
 
:<code>javac -source 1.4 -target 1.4 file_to_be_compiled.java </code>
 
:<code>javac -source 1.4 -target 1.4 file_to_be_compiled.java </code>
 +
 +
I suppose this prevents us from using the new features of Java 1.5, but I don't know what they are.
  
 
As for the test program, download [http://katlas.math.toronto.edu/svn/VasCalc/trunk/javatest.m javatest.m] and [http://katlas.math.toronto.edu/svn/VasCalc/trunk/test1.class test1.class], and issue the following commands in Mathematica (replacing the '/path_to_files' with the location you downloaded the files to, and don't forget the quotes in the second line):
 
As for the test program, download [http://katlas.math.toronto.edu/svn/VasCalc/trunk/javatest.m javatest.m] and [http://katlas.math.toronto.edu/svn/VasCalc/trunk/test1.class test1.class], and issue the following commands in Mathematica (replacing the '/path_to_files' with the location you downloaded the files to, and don't forget the quotes in the second line):

Revision as of 19:58, 15 May 2006

This is the VasCalc Project Progress Log.

Thursday May 11 20006

  • First day meeting's blackboard:
    060511-1.jpg


Sunday May 14 2006

J/Link passed the Hello World test. The java class and Mathematica notebook were commited to the repository trunk. Note the Mathematica file must be edited in order to specify the path to java and the class. In order to get it to work I had to tweak a few things:

  • The JRE bin directory had to be added to the PATH. The JDK path is not enough because J/Link looks for files like jawt.dll and awt.dll that don't come with JDK.
  • HelloWorld.class had to be in one of the dirs in CLASSPATH, because J/Link loads classes only through their full class name.
  • In Mathematica, when running InstallJava[], it was necessary to specify the path name for a newer version of java.exe. By default it runs the Windows java, which didn't run what was compiled with a new JDK.

Ideally, one would like to write a Mathematica notebook without any hardcoded paths that others can use with no changes. Is this possible?

Monday May 15 2006

Another slightly different HelloWorld test has been added to the SVN repository. This time, one can use the default Java runtime bundled with Mathematica/Windows (so the user does not need to know anything about where Java lives on their system) by telling the Java compiler to produce code for Java 1.4. This is accomplished by issuing the command:

javac -source 1.4 -target 1.4 file_to_be_compiled.java

I suppose this prevents us from using the new features of Java 1.5, but I don't know what they are.

As for the test program, download javatest.m and test1.class, and issue the following commands in Mathematica (replacing the '/path_to_files' with the location you downloaded the files to, and don't forget the quotes in the second line):

<< /path_to_files/javatest.m
HelloWorld[VasCalcPath -> "/path_to_files"]

and read your mystery message!