Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [java]

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

32 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
772 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 ...
10
votes
0answers
583 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
688 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
176 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: ...
5
votes
0answers
107 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 ...
4
votes
0answers
196 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
351 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
327 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
53 views

How to temporarily turn off log messages?

I'm using GUIKit in Mathematica 11.0, which throws an error message whenever a window or panel is shown. I know GUIKit is deprecated but I don't want to port a whole project to the newer controls. ...
3
votes
0answers
79 views

Failure connecting JLink with Android Studio -Java application

I want to connect an android application with Mathematica, in order to make some computations and then return the results to the user. I have downloaded Mathmatika and run the Examples from JLink ...
3
votes
0answers
96 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
45 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
70 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
117 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
77 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
108 views

System.Out.println in JLink does not flush to

I am playing with JLink in Mathematica. I created a simple Java(Kotlin) Class HelloKT like this: ...
2
votes
0answers
522 views

How to lock a socket or create a queue for requests?

I try to implement sockets from java.net.ServerSocket in Mathematica. I execute this code step by step: Needs["JLink`"] InstallJava[] (* LinkObject[..] *) ...
2
votes
0answers
370 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
112 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 this?...
1
vote
0answers
91 views

Lock cursor position to mouse

I would like to lock the cursor position, i.e. the insertion point, to the current position of the mouse at all times in a given notebook. An experiment with J/Link approximates this, by repeatedly ...
1
vote
0answers
110 views

Is there a way to know how much Java heap space to set?

I have already set it to be 4GB. Needs["JLink`"] ReinstallJava[JVMArguments -> "-Xmx4096m"] However, when exporting a dataset to Excel sheet, I still get the ...
1
vote
0answers
49 views

Instant detection of digital or analogue variation of a variable with Mathematica in Windows 8.1

I am using an assembly that contains two acquisition board (PCI-1742U-AE and PCIE-1816H-AE) and an external circuit, connected to boards. The computer uses Windows 8.1, and the communication is done ...
1
vote
0answers
51 views

Creating an automatic code feedback for class

I'm trying to create a server application that accepts uploaded Mathematica files (that follow a certain API), then run a few tests on modules defined within those files. This is for a course where ...
1
vote
0answers
43 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
276 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
128 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
70 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
66 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
447 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
21 views

script to remove multiple Connection Linkedin

Unfortunately i have so many Connections About 20,000 in Linkedin, so i need to delete them all in multiple way, but Linkedin allow one by one. i searched there's a way in Internet, but all of them ...
0
votes
0answers
77 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
129 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... ...