Questions about interfacing Mathematica and Java, particularly using J/Link.

learn more… | top users | synonyms (1)

24
votes
4answers
4k views

Efficiently determining if 3D points are within a surface composed of polygons

This is the 2nd part of a previous question which I edited to make into 2 separate questions: Extracting polygons from 3D contour plot surface As an extension of my earlier question involving simple ...
7
votes
1answer
2k views

How to execute a function in the package from java?

I use Wolfram Workbench 2.0. I can get a KernelLink object and evaluate some simple expressions like "2+2". But I don't know how to export a package and execute ...
9
votes
6answers
972 views

Installing RLink on Linux

I'm trying to install RLink here. Needs["RLink`"] InstallR[] After downloading it throws an error: ...
11
votes
2answers
428 views

Connect Frontend to Kernel Started by JVM via JLink

I have a MathKernel started and controlled via JLink from a JVM. The $CommandLine for this kernel is: ...
9
votes
1answer
145 views

Installing LinkSnooper on Windows

I tried to install LinkSnooper on my Windows 7 computer, as described in the documentation and here. According to the answer of @Todd Gayley, I entered the following string in the field MLOpen: ...
10
votes
2answers
398 views

Giving JLink Huge Memory by Default

I have noticed that Mathematica makes use of Java by way of JLink, for example, in the extensions such as DatabaseLink and (I think) RLink. It also seems like Java is a first-class citizen for writing ...
7
votes
3answers
2k views

Failed to connect remote Mathematica kernel using J/Link

I'm trying to connect to a remote Mathematica 8 kernel (on a Windows machine) using J/Link. On the client machine, I put the JLinkNativeLibrary.dll file in ...
5
votes
2answers
297 views

Automate mouse clicks with Mathematica

I need to automate mouse clicks with Mathematica. However, a similiar question was closed on this forum, without any answer. Consider the following steps: ...
10
votes
1answer
130 views

Using Java log4j in Mathematica

Someone has a code example of how log4j can be used to create logs in Mathematica? RLink uses it, as can be checked in ...
9
votes
2answers
745 views

Why is JLink loaded every time I start Mathematica?

When I start a Mathematica 8 session (either command line or with the notebook front end), I notice that there are several packages that have already been loaded for me (using ...
28
votes
1answer
4k views

Programmatically retrieving e-mails from a remote server

Mathematica has a function for sending mail (SendMail) and can import the MBOX format. But what I'd like to do is ...
10
votes
3answers
6k views

Connect to SQLite database

I am trying to connect to a SQLite database and since there is no officially supported driver; I decided to use the sqlite-jdbc driver and port the respective code into Mathematica. However, the ...
9
votes
0answers
331 views

J/Link doesn't work with Java 8?

I have some code that successfully uses J/Link (well... until today when something I was doing something with it that crashed the JVM, so), and I recently tried running it under Java 8. I then get a ...
7
votes
1answer
830 views

How can I connect to the IB TWS platform from Mathematica?

TWS is the trading platform of Interactive Brokers. Accessing it programmatically could be useful for various purposes. How could I access it from Mathematica ?
6
votes
1answer
155 views

LinkSnooper troubles on Windows

I'm trying to get LinkSnooper up and working on a Windows 7 machine to monitor the interaction between the Mathematica front end and MathLink. I'm facing great troubles following the instructions ...
3
votes
1answer
239 views

Creating event handler with ImplementJavaInterface inside a package

I am trying to make my Mathematica function to serve as an event handler for the events generated by a Java object. Specifically, I have a Java object that connects as a client to a server that ...
9
votes
2answers
292 views

Working with Java hashmaps from Mathematica

I'm using J/Link to access data from an external Java program. The data are represented as a ConcurrentHashMap (see the official specification here). ...
7
votes
1answer
787 views

Efficiently deleting rows in many large text files

I have 500 text files each of about 200000 rows. I need to delete one row in each of them as fast as possible (later such operations will repeat). What is the best way to do this with Mathematica? ...
6
votes
1answer
161 views

Using enum values with J/Link

How can I pass enum values to a function when using J/Link? What is the correct syntax for typing an enum value? For example, call normalize() using ...
3
votes
1answer
182 views

How could get all escape characters in Mathematica?

I am evaluating expression by using KernelLink. But the kernel will be suspended endless when meets a invalid escape character. ...
2
votes
1answer
174 views

Clojuratica setup

I am trying to get Clojuratica set up (MMa v 9 free trial) (on a Mac running Mavericks) I am following the instructions in "Clojure Data Analysis Cookbook" but have also followed the instructions: ...
12
votes
1answer
246 views

MakeJavaObject on list of inhomogeneous objects belonging to the same base class

When using J/Link, how can we create an array out of objects belonging to different classes but having the same base class? Here's an example: ...
10
votes
1answer
117 views

Converting text from unsupported encodings like 866 into known by Mathematica?

The list of character encodings currently supported by Mathematica is still extremely limited. For example, it supports only three standard IBM PC (OEM) code pages: ...
5
votes
1answer
765 views

Error trying to open a notebook in Wolfram Workbench [duplicate]

I recently set up Mathematica 9.0.1 on a new computer, along with x64 Eclipse Indigo with JRE 1.7, and the Wolfram Workbench 2 plug-in. Something is amiss, because when I try to do any sort of task ...
4
votes
1answer
64 views

InstallJava on a parallel kernel while debugging in Wolfram Workbench

Here's my problem. I need to create a link between a client that is a parallel Wolfram kernel and a server through a Java API. I'm using Wolfram Workbench in debugging mode (like most of the time ...
0
votes
2answers
4k views

KeyPress function in Java's Robot class, how to state parameter?

I am trying to use Java's Robot class to type. This is what I have done so far. Needs["JLink`"]; InstallJava[]; robot = JavaNew["java.awt.Robot"] The mouseMove ...