<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://drorbn.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=142.150.139.33</id>
	<title>Drorbn - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://drorbn.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=142.150.139.33"/>
	<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=Special:Contributions/142.150.139.33"/>
	<updated>2026-05-01T16:22:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://drorbn.net/index.php?title=HoriAsso_-_Documentation&amp;diff=1638</id>
		<title>HoriAsso - Documentation</title>
		<link rel="alternate" type="text/html" href="https://drorbn.net/index.php?title=HoriAsso_-_Documentation&amp;diff=1638"/>
		<updated>2006-08-04T00:59:26Z</updated>

		<summary type="html">&lt;p&gt;142.150.139.33: /* How to set up a system for using Java in Mathematica */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this project, we will be mainly using Commands in Mathematica to access Java programs that we write.  Here is how to set up the system:&lt;br /&gt;
&lt;br /&gt;
[[HoriAsso|Documention|JavaDoc]] &lt;br /&gt;
=How to set up a system for using Java in Mathematica=&lt;br /&gt;
&lt;br /&gt;
==How to install &#039;&#039;Mathematica&#039;&#039;,&#039;&#039; J/Link&#039;&#039;, and &#039;&#039;Java&#039;&#039;==&lt;br /&gt;
*Install &#039;&#039;Mathematica&#039;&#039; following the [http://documents.wolfram.com/mathematica/GettingStarted/SettingUp/InstallingMathematica.html official instructions]. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;Jlink&#039;&#039; is already completely installed in &#039;&#039;Mathematica 4.2&#039;&#039; and later. If you are using earlier versions of &#039;&#039;Mathematica&#039;&#039;, you can install &#039;&#039;JLink&#039;&#039; following the  [http://www.wolfram.com/solutions/mathlink/jlink/Installation.html official instructions]. &lt;br /&gt;
&lt;br /&gt;
*Download &#039;&#039;JRE 5.0 Update 6&#039;&#039; (latest as of June 2006) the latest version from [http://java.sun.com/j2se/1.5.0/download.js Sun] and install it following the official [http://java.sun.com/j2se/1.5.0/install.html official instructions].&lt;br /&gt;
&lt;br /&gt;
==How to start using &#039;&#039;Jlink&#039;&#039; in a &#039;&#039;Mathematica&#039;&#039; notebook==&lt;br /&gt;
*Write the Java source code (&#039;&#039;.java&#039;&#039; files) and compile it using the command&lt;br /&gt;
 javac file.java&lt;br /&gt;
Place the compiled files (&#039;&#039;.class&#039;&#039; files) in the directory you want. (I have not tried to make .jar files yet so I will not write about it here)&lt;br /&gt;
&lt;br /&gt;
*For detailed documentation on &#039;&#039;JLink&#039;&#039;, please consult the &#039;&#039;Jlink&#039;&#039; manual in the &#039;&#039;Mathematica&#039;&#039; Help Browser.  The following are extracted from there.&lt;br /&gt;
&lt;br /&gt;
*Open a &#039;&#039;Mathematica&#039;&#039; notebook, install &#039;&#039;JLink&#039;&#039; by (writing and executing): &lt;br /&gt;
 Needs[&amp;quot;JLink`&amp;quot;] &lt;br /&gt;
&lt;br /&gt;
*Install &#039;&#039;Java&#039;&#039; by:&lt;br /&gt;
 InstallJava[] &lt;br /&gt;
or to use a specific java runtime if you have more than one installed on your computer:&lt;br /&gt;
 InstallJava[commandLine-&amp;gt;&amp;quot;/wherever/java/is&amp;quot;] in Linux&lt;br /&gt;
 InstallJava[CommandLine -&amp;gt; &amp;quot;d:\\\\path\\to\\java.exe&amp;quot;] in Windows &lt;br /&gt;
&lt;br /&gt;
*Add the directory which contains the compiled java (.class) files to the class path, ie, where Java will look for class files, by &lt;br /&gt;
 AddToClassPath[&amp;quot;wherever/my/class/files/are&amp;quot;] in Linux&lt;br /&gt;
 AddToClassPath[&amp;quot;c:\\my\\java\\dir&amp;quot;] in Windows&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Load the Java classes by&lt;br /&gt;
 LoadJavaClass[&amp;quot;Classname1&amp;quot;]&lt;br /&gt;
 LoadJavaClass[&amp;quot;Classname2&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Create New Java Objects by&lt;br /&gt;
 JavaNew[&amp;quot;classname1&amp;quot;,constructorArg1,constructorArg2...]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Access the non-static methods and variables of any object the same way you would in Java except replace &amp;quot;&#039;&#039;&#039;.&#039;&#039;&#039;&amp;quot; (&#039;&#039;java&#039;&#039;) by &amp;quot;&#039;&#039;&#039;@&#039;&#039;&#039;&amp;quot; (&#039;&#039;Mathematica&#039;&#039;) and &amp;quot;&#039;&#039;&#039;()&#039;&#039;&#039;&amp;quot; (&#039;&#039;Java&#039;&#039;) by &amp;quot;&#039;&#039;&#039;[]&#039;&#039;&#039;&amp;quot; (&#039;&#039;Mathematica&#039;&#039;). Access static methods or variables by replacing &amp;quot;&#039;&#039;&#039;.&#039;&#039;&#039;&amp;quot; in &#039;&#039;Java&#039;&#039; by &amp;quot;&#039;&#039;&#039;`&#039;&#039;&#039;&amp;quot; in &#039;&#039;Mathematica&#039;&#039;. (I haven&#039;t used the static methods yet so I am not entirely sure.)&lt;/div&gt;</summary>
		<author><name>142.150.139.33</name></author>
	</entry>
</feed>