Questions tagged [java]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

How to use JLink to connect and read data from Tableau Hyper using Hyper API?

First of all, here is the link to download the API for Java for Windows. I initially wanted to use NETLink since I have some experience with it but they have ...
user13892's user avatar
  • 9,113
1 vote
0 answers
79 views

Rainbow Brackets for the Mathematica GUI?

Is there a way to add rainbow bracket-pair colorization to the Mathematica / Wolfram Desktop GUI? If not, how can I request one :) This is one feature that I have grown to love when writing WL or lisp ...
Alec Graves's user avatar
1 vote
1 answer
64 views

How can I use older JDBC driver(s) to connect with old mySQL databases?

I got a new Mac at work, fresh install of Mathematica v13.3 (old 2015 Mac is dying and has v11.3). Problem: In v13.3 I cannot connect to older mySQL databases, using v13's JDBC driver (...
Mark_in_DK's user avatar
0 votes
1 answer
68 views

Error "cannot find the required native library named JLinkNativeLibrary"

I have a problem running my test program on linux. I want to connect to mathematica kernel using java API. On windows, I put both jlink.jar and JLinkNativeLibrary.dll next to my executable file, let's ...
Azzurro94's user avatar
  • 499
0 votes
0 answers
74 views

Can I connect to Cloud API using Java code?

I have a Java program that connects to a Mathematica Kernel, installed on my computer. I am able to call the APIs and receive the expression results, like to the code below. But is there any cloud ...
Azzurro94's user avatar
  • 499
1 vote
1 answer
79 views

What is the gradle dependency for J/Link?

After much googling, browsing several answers on MathematicaSE as well as going through the J/Link docs, I haven't figured out the Gradle dependency for ...
lineage's user avatar
  • 1,114
3 votes
1 answer
338 views

JAVA error NoSuchFieldException: usr_paths with OpenSQLConnection after installing 13.2

I performed a fresh install of Mathematica 13.2. The first code that I tried worked just fine under 13.0. It opens an SQL server connection using single sign-on (SSO) for my credentials. However, in ...
Sjoerd C. de Vries's user avatar
9 votes
2 answers
266 views

How to convert a Java BufferedImage to a Mathematica Image?

Mathematica's CurrentScreenImage is very buggy on multiple monitor setups, so Wolfram tech support has proposed to use .NET or Java frameworks to implement my own. ...
John's user avatar
  • 2,409
1 vote
0 answers
97 views

Execute wolfram command from java & j/link along with set of variables [closed]

I have been trying to execute some expression/formula which may have multiple variable, and I want to set values(like how we do on kernel command tool). We are using J/Link to connect kernel from java....
Oviyan's user avatar
  • 11
4 votes
1 answer
111 views

Change DataStructure (or maybe just a symbol) from JLink/Java program

I try to use JLink and Java program for receiving responses from the abstract WebSocket server. WSS not supported by Wolfram Language now, but I can use this java project + JLink for the creating a ...
Kirill Belov's user avatar
0 votes
0 answers
53 views

How do I call command-line tools from a standalone java library using WL?

I have the following command which when I run on the windows command line, works perfectly fine. ...
user13892's user avatar
  • 9,113
0 votes
0 answers
87 views

How to extract the images from a wolfram list to an array/list of byte arrays using JLink in Java

I have the following code in Java, where I am trying to use the WolframAlpha command and get the result as a list of images (byte arrays) ...
user82953's user avatar
6 votes
0 answers
125 views

How to Compile an Open-Source Java Project which depends on the Wolfram Engine for Developers?

Background: I have a license-related compile-cycle question. I developed a rather large Java project that partially uses the Wolfram Engine (for Developers) to perform certain computations. The ...
Highchiller's user avatar
0 votes
1 answer
60 views

Is there a way to represent/call Java's or operator in Mathematica?

In Java, I can do Int char = '~' | 0x10000 Is there a way to call this Java code in Mathematica? I checked https://reference.wolfram.com/language/JLink/tutorial/CallingJavaFromTheWolframLanguage.html ...
qazwsx's user avatar
  • 8,666
2 votes
1 answer
139 views

OpenSQLConnection fails - due to some Java problem?

After upgrading to 12.3, I can no longer connect to an MS SQL Server using OpenSQLConnection. Apparently due to some problem with Java(?). I tried to reinstall JRE 8, but no change. DatabaseExplorer[] ...
HJensen's user avatar
  • 517
2 votes
0 answers
78 views

Update Matrix entry from Java

I found the following example online (which works fine) for sending commands from Java: ...
Gouz's user avatar
  • 291
2 votes
1 answer
73 views

Building a Manipulate and an ArrayList with JLink

I'm wondering if it's possible to put this code inside a Manipulate. I tried just like this and got the results in the message box: Then when I selected a diferent word from the PopMenu I got this: ...
Mara Luisa Amada Tercero's user avatar
1 vote
1 answer
50 views

Incorrect number or type of arguments when using @contains[ ]

I tried to make the old code you suggested me a little faster by doing this changes: ...
Mara Luisa Amada Tercero's user avatar
2 votes
1 answer
620 views

Problems when importing a custom Java class

I have a jar file so I tried to run the class from Mathematica following these steps, but I get all these: ...
Mara Luisa Amada Tercero's user avatar
2 votes
1 answer
144 views

How can I connect Mathematica to an SAP/ERP server?

I am trying to get some references for accessing an SAP/ERP server from Mathematica. It has been suggested that possibly JLink or NetLink could be used. Assuming that I have the server address, ...
user2047's user avatar
1 vote
1 answer
64 views

Having no result with Jlink function

I'm new at Jlink (and English, so I'm sorry if things aren't clear). I did a code which tries to scan a file searching for a given word. As a result, I'm supossed to get the line where the given word ...
Mara Luisa Amada Tercero's user avatar
2 votes
0 answers
222 views

J/Link with Environment Variables and Command-Line Parameters

I have inherited a large number of Java files with classes I am trying to call from Mathematica via J/Link. They are legacy and am not at liberty to modify. A few are used on command-line scripts (...
e'e's user avatar
  • 31
5 votes
1 answer
64 views

Prevent JLink from using a DisabledPreferencesFactory with Java on Linux

This is kind-of a strange question, so please bear with me. We have a Java application that has a utility for Mathematica 12 that lets you run our app from Mathematica using JLink. This works fine ...
Jasper's user avatar
  • 153
3 votes
1 answer
139 views

A JAVA Program wants call Mathematica's Reduce function to solve equation and get the result

...
amorsadness's user avatar
5 votes
1 answer
72 views

Missing ticks and numbers on a plot when using JLink + Mathematica 11.3

I am facing a pretty random problem using JLink (Java) connected to a Mathematica 11.3 kernel and front-end. Basically I want to get an image using the JLink Java method ...
SevenEvos's user avatar
4 votes
1 answer
686 views

Is there any way that convert entire mathematica code to java or python?

I am novice to Mathematica. I want to convert Mathematica code from my textbook to Java or Python to trace coding.
Cecelia's user avatar
  • 61
2 votes
1 answer
111 views

Convert a Java object to interface via J/Link

I'm trying to use a Java library called CDK with Mathematica's J/Link. ...
user60299's user avatar
17 votes
1 answer
448 views

Using ImageJ filters directly from Mathematica through J/Link

tl;dr I am looking for a short but complete example that shows how to apply an ImageJ filter to a Mathematica Image through J/Link. Fiji/ImageJ is one of the ...
Szabolcs's user avatar
  • 233k
1 vote
0 answers
140 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 ...
Daniel Martin's user avatar
9 votes
1 answer
142 views

How to launch a separate Java VM on each sub-Kernel?

I have some code that process very large flat files in to separate HSQL(Standalone) databases using ParallelSubmit and JDBC for each file using the strategy in this post (19542). Lately I keep ...
Edmund's user avatar
  • 41.7k
6 votes
1 answer
120 views

Incorrect number or type of argument when using Jlink to call setAccessible

I am trying to use Java reflection to access stateVector from the following package: ...
Todd Johnson's user avatar
7 votes
1 answer
448 views

Update Java used by Mathematica 10

I would like to update the Java version used by Mathmematica 10 from 1.7.x to 1.8.x/ Is it possible without installing Mathematica 11? I have the latest Java on my system, but Mathematica 10 uses an ...
pnz1337's user avatar
  • 609
1 vote
0 answers
408 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 ...
Chen Stats Yu's user avatar
4 votes
2 answers
170 views

J/Link HMAC Base64

I am trying to recreate a Java algorithm in Mathematica. It is taking a key and signing a message using the HMAC and SHA256 algorithm. The Java code for which I am basing it off is here I have ...
Ray Troy's user avatar
  • 1,289
0 votes
0 answers
220 views

How to save Image or Graphics in Terminal? [duplicate]

In my Linux computer,it can't save Image or Graphics to picture format such as ...
partida's user avatar
  • 6,776
2 votes
0 answers
152 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: ...
lkahtz's user avatar
  • 121
1 vote
1 answer
34 views

Need J/Link values returned in 1D instead of 2D format (i.e., not exponents, fractions, on multiple lines)

The following code shows how default KernelLink values are sent back to Java in 2D text form. Which becomes a heap-big mess in an array of exponential values, since all the exponents are printed first ...
ehounder's user avatar
  • 167
1 vote
1 answer
210 views

Trying to run J/Link SampleProgram.java from Mac Terminal: Exception in thread "main"

Trying to run the [WSTP J/Link SampleProgram.java][1] Mathematica version 11.0.1.0 file from the MacOS Sierra version 10.12.6 Terminal, generates "Exception in thread "main" ... Updating to Oracle ...
ehounder's user avatar
  • 167
3 votes
1 answer
258 views

What does it mean that GUIkit is being deprecated?

What is the disadvantage of using GUIKit now? What does it mean that it is being deprecated? Will it be removed from Mathematica in some later versions?
RicardoP's user avatar
3 votes
1 answer
87 views

Failed to load JLink in consecutive antcall's

I'm using Ant script in Eclipse using Workbench on Windows 7. I've used multiple versions but the issue persists. Essentially, I define multiple targets and call them in sequence like this: Multiple ...
user45763's user avatar
7 votes
1 answer
238 views

J/Link stealing focus from the Front End on OS X. Workaround?

Link to Wolfram Community version Calling getDefaultToolkit() through J/Link causes the Front End to lose focus. This is specific to OS X. Here is a minimal ...
Szabolcs's user avatar
  • 233k
3 votes
0 answers
77 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. ...
SimonH's user avatar
  • 163
2 votes
1 answer
203 views

How to get the image in the clipboard with a J/Link method?

The Paste will not give a return,just print the content of clipboard.It is hard to asign the result to a variable.I make a .NET method here to get the image in ...
yode's user avatar
  • 26.3k
2 votes
0 answers
768 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[..] *) ...
Kirill Belov's user avatar
4 votes
1 answer
203 views

When using Java objects through JLink, how can I multitask the objects?

I use Mathematica 11.0.1 on Windows 10 and have a Java class which acts as a 'facade' for a headless browser (PhantomJS). In Mathematica I instantiate the class through JLink as follows: ...
nilo de roock's user avatar
1 vote
0 answers
53 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 ...
rosu_constantin's user avatar
1 vote
0 answers
54 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 ...
michael99man's user avatar
1 vote
2 answers
208 views

Clearing the JavaClassPath at Runtime in JLink

I am trying to access a remote MongoDB database through Mathematica using JLink. The connection is fine, but my installation of Mathematica 10.0 seems to contain an SLF4J logger addon, which prints ...
knowbodynos's user avatar
3 votes
0 answers
318 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 ...
MTs's user avatar
  • 31
8 votes
1 answer
772 views

How to create keypress simulation program?

Main Problem I'm trying to create a widely applicable keypress simulation program, but I don't know how to use Java so I can only search for Q&As on the site, which is inefficient. So I want to ...
Wjx's user avatar
  • 9,518