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

learn more… | top users | synonyms (1)

2
votes
1answer
65 views

What does the function StartJava do? [closed]

In Mathematica's autocomplete list, the function StartJava appeared. I searched the mathematica's reference site and found that the function was undocumented. What does it do?
7
votes
1answer
225 views

Implementing Local HTTP Server

How might I implement a local HTTP server using either Java, C#, C or purely Mathematica? It should be able to respond with Mathematica input to GET and POST requests ideally on W7. This is related ...
3
votes
0answers
43 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 ...
1
vote
1answer
92 views

How to fix a “Java failed to load class” when using custom Java class using JLink?

I have a Java project compiled into a jar file with a class called HttpClientSSO. The commandline java -cp bota.jar org.nilostep.bota.HttpClientSSO executes ...
3
votes
1answer
76 views

How to stop running Java?

<< JLink`; InstallJava[]; Clear[serverSocket, socket]; serverSocket = JavaNew["java.net.ServerSocket", 12345]; socket = serverSocket@accept[]; If I enter ...
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 ...
0
votes
0answers
38 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 ...
3
votes
1answer
192 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. ...
10
votes
0answers
212 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 ...
1
vote
0answers
29 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 ...
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, ...
6
votes
0answers
102 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 ...
10
votes
1answer
120 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: ...
1
vote
1answer
55 views

can CDFDeploy command work via JLink

I tried the following command in notebook. It creates a .cdf file. ...
2
votes
0answers
112 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: ...
3
votes
0answers
77 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 ...
11
votes
1answer
134 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 ...
3
votes
1answer
171 views

Problem trying to compile JLink application

I have no trouble compiling and running the sample Java to Mathematica program SampleProgram.java that can be found in the Wolfram installation: ...
2
votes
1answer
77 views

What is the Java converter?

I notice that there is a directory: C:\Program Files\Wolfram Research\Mathematica\10.2\SystemFiles\Converters\Java. What is this? I could not find any documentation ...
10
votes
1answer
221 views

Fast way to pass an array of integers to Java using JLink

I am using a package from java to compress a list of integers, this package provide me two methods, one for compress and other one for uncompress. Each of these methods has a version to ...
2
votes
1answer
148 views

Can I use Mathematica Online kernel to evaluate expressions from java on my PC?

I know it's possible to evaluate expressions using Mathematica kernel that's on my computer using J/Link. Is it possible to do the same but use the remote kernel that my Mathematica Online uses?
1
vote
0answers
71 views

Awkward DatabaseLink JDBC Error [closed]

I've created a GUI application (a database editor) that uses DatabaseLink and it is currently working fine on my PC (M10.02, Windows 7) and on a clients's PC (CDF Player Pro 10.02, Windiws 8). While ...
4
votes
1answer
65 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 ...
5
votes
1answer
115 views

How to discover a Java Class Path used by LoadJavaClass?

How can I discover which path is read to load some Java class using the command: LoadJavaClass["my.java.class"]? I believe all ...
7
votes
2answers
120 views

Why doesn't Import work with XOWA offline Wikipedia database?

I'm having trouble with importing HTML from XOWA offline wikipedia database. I set up a local server for datamining, but I can't access it with Mathematica. I can request a HTML page with ...
6
votes
1answer
115 views

How can I see more of the Java stack trace when an exception occurs in JLink?

If I call into Java code via JLink`, and there is an uncaught exception, Mathematica produces a Java::excptn message, and prints ...
4
votes
0answers
103 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
1answer
75 views

Is it possible to get the locations and dimensions of all boxes in a StandardForm expression renderation?

I can select all the boxes in a StandardForm rendered expression, like I've selected the left parenthesis in the picture above. Is it possible to get the positions and dimensions of all of these ...
4
votes
1answer
160 views

How to make a widget float?

Is there an option or way to make a GUIKit window remain in on top of other application's windows? ...
1
vote
0answers
127 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 ...
5
votes
1answer
402 views

How can I integrate Open-CV with Mathematica?

I would like to run Open-CV functions from within Mathematica, can anyone figure out how to do this?
2
votes
1answer
194 views

How to get a audio file's duration time in Mathematica?

I have a *.avi file and if I want to know the file's duration time: I can use this code to get the result: Import["test.avi", "Duration"] or the code to get the ...
5
votes
0answers
131 views

IntelliJIdea front-end plugin with JLink [closed]

I did some proof-of-concept work on having Mathematica Front-End (MathSessionPane) in the IntelliJ Idea as a plugin https://github.com/dubrousky/Mathematica-REPL. It uses JLink as a runtime dependency ...
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 ...
2
votes
1answer
54 views

JLink does not preserve the input cell number

I use JLink for connecting to the Mathematica kernel and evaluate some expressions. The In[] prompt is not continuous - it has step 3. I.e. the first expression is In[1] and after the evaluation the ...
9
votes
1answer
161 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: ...
7
votes
1answer
874 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 ?
3
votes
1answer
227 views

Creating a generic empty list with JLink

I'm trying to reproduce a Java code in Mathematica using JLink, I'm making calls to an API in a JAR file. For one of the function call an empty list of a given type is needed but I don't know the ...
6
votes
1answer
283 views

How to find out the current memory on the JVM?

I want to find out the amount of memory available in the Java Virutal Machine. I tried: ...
9
votes
0answers
355 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 ...
1
vote
0answers
48 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). ...
8
votes
0answers
576 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 ...
0
votes
0answers
106 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... ...
3
votes
0answers
59 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... ...
1
vote
0answers
59 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?
6
votes
1answer
310 views

Using J/Link with Wolfram Programming Cloud

Is it possible to use J/Link in a Wolfram Programming Cloud notebook? I need it to load and use 3rd-party .jars.
11
votes
2answers
441 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: ...
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 ...
5
votes
0answers
85 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 ...