How to Communicate between NetBeans IDE (Java) and Matlab?

1 Ansicht (letzte 30 Tage)
Ben Murphy
Ben Murphy am 16 Mär. 2017
Kommentiert: Mikita am 29 Dez. 2024
Hello all,
I'm currently trying to create the makesqr function and enable a project written in Java to call and run it. I've been following the steps found here.
I'm currently trying to run the program using Netbeans IDE 8.2, instead of the command prompt and that is the step I'm currently on. The current error I have is as follows:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find the library mclmcrrt8_3.dll, required by MATLAB Builder JA, on java.library.path. This library is typically installed along with MATLAB or the MCR, its absence may indicate an issue with that installation or the current path configuration. The MCR version that this component is trying to use is: 8.3.
Currently the library and Jar files I have imported to the project are (Path in quotes):
javabuilder.jar "D:\Matlab\MATLAB\MATLAB Compiler Runtime\v83\toolbox\javabuilder\jar\javabuilder.jar"
makesqr.jar "D:\Matlab\application\makesqr.jar"
JDK 1.7.0_11 "D:\Java\jdk1.7.0_11"
Code I'm using:
import com.mathworks.toolbox.javabuilder.*;
import java.util.Scanner;
import makesqr.*;
public class getmagic
{
public static void main(String[] args)
{
Scanner reader = new Scanner(System.in); // Reading from System.in
System.out.println("Enter a number: ");
String[] w; // Scans the next token of the input as an int.
int d = reader.nextInt();
System.out.println(d);
String[] number;
number = new String[d];
double Adata = 24;
MWNumericArray A = new MWNumericArray(Adata);
System.out.println("Array A is of type " + A.classID());
}
}
I used System.out.println(); to try and find how far along the code it would get before the error and found that the error happens as soon as I use MWNumericArray.

Antworten (0)

Kategorien

Mehr zu Java Package Integration finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by