From: Abu Muhammad on
Hi,

I am going over the magicsquare example for the MATLAB Builder given in the documentation. In compiling the getmagic.java file I get the errors below. I searched the forum but did not find something that worked for me.

1)Do I have to include in the path the .jar file produced by MATLAB Builder?

2)I have the path set for javabuilder.jar, I thought this would take care of the com.mathworks package, is this correct? If not, how would com package be found since it is imported in the getmagic.java?

Thanks.

=========================================================

getmagic.java:9: package com.mathworks.toolbox.javabuilder does not exist
import com.mathworks.toolbox.javabuilder.*;
^
getmagic.java:20: cannot find symbol
symbol : class MWNumericArray
location: class getmagic
MWNumericArray n = null; /* Stores input value */
^
getmagic.java:34: cannot find symbol
symbol : variable MWClassID
location: class getmagic
n = new MWNumericArray(Double.valueOf(args[0]),MWClassID.DOUBLE);
^
getmagic.java:39: cannot access com.mathworks.toolbox.javabuilder.internal.MWCom
ponentInstance class file for com.mathworks.toolbox.javabuilder.internal.MWComponentInstance not found
theMagic = new magic();
^
getmagic.java:55: operator != cannot be applied to magicsquare.magic,<nulltype>
if (theMagic != null)
^
=========================================================
From: Ed Yu on
Did you add the javabuilder.jar into the environmental variable CLASSPATH (not PATH)? Good luck!

Ed.
From: S on
"Ed Yu" <ekyu88(a)hotmail.com> wrote in message <hksjet$ehr$1(a)fred.mathworks.com>...
> Did you add the javabuilder.jar into the environmental variable CLASSPATH (not PATH)? Good luck!
>
> Ed.

Thanks for the reply Ed. Yes, I got it to work. I had it in the classpath initially but for some reason it javac couldnt find it.