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

learn more… | top users | synonyms (1)

10
votes
0answers
194 views

How to bundle JLink with Java application using apache maven

The context: I am planning to visualize some results from my MMA code using D3.js. So I wanted to make a simple REST api using the light weight SparkJava framework. Given my fairly nonexistent ...
9
votes
0answers
333 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 ...
8
votes
0answers
564 views

Problems running Mathematica 10 with Workbench 2 Windows 7 64 bit

My Workbench runs perfectly using Mathematica 9, however simple things which run just using the Mathematica 10 front end won't run when using Mathematica 10 and Workbench 2. These simple two lines of ...
6
votes
0answers
101 views

Echo server with Mathematica

Consider the following scenario: two wireless notebooks communicating via ad hoc one computer (the client) send packets via TCP protocol without Mathematica the other one is an echo server ...
5
votes
0answers
84 views

Possible JLink memory leak (during) object creation

Using MMA 9.0.1 on win7-64. When creating a large number of java objects I noticed memory being consumed in huge quantities (several Gb). This memory is returned/deallocated after my call ...
5
votes
0answers
157 views

How to deal with WebServices error “any is not supported in sequence”?

I am trying to aquire data through Mathematica's WebServices and this example works just fine: ...
4
votes
0answers
98 views

How to make an executable .jar connect to Mathematica

I am writing a Java Swing program which collects data and connects to Mathematica to do some computations. As other answers here suggested, I have included JLink.jar in the classpath, as well as the ...
4
votes
0answers
289 views

How to improve gesture detection by JLink for the LeapMotion controller

Building on this thread (where I cannot add anything anymore somehow) and with this nice answer I kind of got swipe detection to work, but it is not very responsive. How to improve (in the sense of ...
4
votes
0answers
302 views

Why does OS X need permission to allow JLink connections each time it starts?

I understand that JLink loads each time Mathematica launches or each time a kernel starts, and that this can require permission from the firewall, if it is enabled but OS X provides settings the ...
3
votes
0answers
40 views

What is the appropriate way to handle JVM memory issues in a Mathematica package?

I maintain a large Mathematica package (here) that, for certain operations, calls out to a Java library (here). The details of the libraries are not important, but I've come across a frustration with ...
3
votes
0answers
30 views

Can JLink return a structured object?

What I want to achieve seems obvious but I cannot figure it out: I need to find a way that when I send an expression to be evaluated from a Java back end to a Mathematica kernel, I can live with it ...
3
votes
0answers
38 views

Java anonymous functions from JLink?

JLink is really great to act on Java objects and access Java static methods. I'm asking myself if there would be a way to have access to a more recent Java syntax that allows anonymous functions, ...
3
votes
0answers
74 views

Showing Mathematica's dynamic UI in external Java programs

I want to run Mathematica from an external Java program and display an interactive app in my own Jpanel. Is it possible? When I tried using MathGraphicsJpanel, I am getting only the snapshot of the ...
3
votes
0answers
58 views

Create custom mappings of Mathematica Expressions => Java Objects?

I would like to call a JLink-based java function from Mathematica with a Mathematica Span[] object as shorthand, like so... ...
2
votes
0answers
86 views

How to run existing mathematica nb from Java

I have the Mathematica notebook (Test.nb in this case), how can I run in from Java? So far I have the following code. If I type: ...
2
votes
0answers
96 views

Graphics always rendered twice with SimpleFrontEnd example?

I am looking at the Java SimpleFrontEnd example provided by Mathematica. Everything goes well except it always renders graphics twice. Can anyone help me with ...
2
votes
0answers
936 views

mathematica startup time

I have Mathematica 7 and 8 installed on my laptop. Mathematica 7 starts quite fast, but Mathematica 8 is extremely slow to start. In the Option Inspector I canceled the "welcome screen" option at ...
1
vote
0answers
26 views

MathCanvas.setMathCommand behaving badly and I have no Idea how to debug

For my first attempt to call Mathematica from Java, I got the GraphicsApp sample program working, then defined a package with a function called "metric" and made sure that that package works when ...
1
vote
0answers
121 views

using Mathematica library in Java

I am trying to build a Math expression calculator in Java. Is any way for using Mathematica libraries in Java program without ...
1
vote
0answers
74 views

Using GUI with JLink

How to handle Input/Manipulate expressions using JLink? Say I want to handle the $Input[]$ expression sent via JLink to the MathKernel. Currently the my app blocks on waiting the response. How this ...
1
vote
0answers
47 views

How to call a java method that takes a boolean (not Boolean)?

I'm trying to call a method on a java object that takes a single boolean argument - note boolean (native or primative) not Boolean (Object or Reference type). ...
1
vote
0answers
58 views

Is there any metadata-holding mechanisms in Mathematica programming similar to Java annotations?

I'm re-implementing some tools previously implemented in Java in Wolfram Language. Is there any metadata-holding mechanisms in Mathematica programming similar to Java annotations?
1
vote
0answers
54 views

Clojuratica setup in Windows

I have been trying to setup Clojuratica on Windows using instructions from Clojure Data Analysis Cookbook and http://drcabana.org/2012/10/23/installation-and-configuration-of-clojuratica/ Each time I ...
1
vote
0answers
258 views

InstallJava::fail error when importing an image with a Raspberry Pi

I'm trying to import an image in Mathematica on my Raspberry Pi. The code is simple but I get an error when importing: ...
0
votes
0answers
33 views

Popup window shows after kernel closed when using J/Link

A popup window always show after kernelLink.close(); And this only happen after expression evaluated as graph. Such as ...
0
votes
0answers
102 views

Lightweight Grid preferences screen stopped working after v10 install

I am getting the following error when I try to open the Lightweight Grid "Preferences" tab... ...
0
votes
0answers
84 views

Evaluating expressions stored in notebook from Java

The Mathematica kernel can generally open a notebook and evaluate the functions present in the notebook using UsingFrontEnd Command. Example: ...