Reputation: 2789
I am running a matlab function which uses the LinkedList class from java. But when I run the script I get the following error:
Undefined function or variable 'LinkedList'.
Error in (line 6)
Q = LinkedList();
In the beggining of the code I do the following
import java.util.LinkedList
Q = LinkedList();
I think matlab is not founding java library files. Java is installed on my computer as the following command on my linux machine shows:
update-java-alternatives -l
java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64
I am using the command line matlab.
What I missed here?
Upvotes: 0
Views: 250
Reputation: 36720
Matlab 2012a is bundled with an Java 6 JRE. Unless you require a newer Java (which does not seem to be the case) I would strongly recommend to use this java version. To make Java available:
matlab/sys/java/jre/glnxa64
MATLAB_JAVA
might be missing. If this is the case, reinstall matlab with the official installer.Upvotes: 2