Thread Subject: com.mathworks.toolbox.javabuilder package

Subject: com.mathworks.toolbox.javabuilder package

From: Abu Muhammad

Date: 15 Jan, 2010 17:44:05

Message: 1 of 6

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)
                      ^
=========================================================

Subject: com.mathworks.toolbox.javabuilder package

From: Ed Yu

Date: 9 Feb, 2010 21:18:21

Message: 2 of 6

Did you add the javabuilder.jar into the environmental variable CLASSPATH (not PATH)? Good luck!

Ed.

Subject: com.mathworks.toolbox.javabuilder package

From: S

Date: 9 Feb, 2010 21:33:05

Message: 3 of 6

"Ed Yu" <ekyu88@hotmail.com> wrote in message <hksjet$ehr$1@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.

Subject: com.mathworks.toolbox.javabuilder package

From: Saket agarwal

Date: 4 Apr, 2011 17:23:06

Message: 4 of 6

hi.. i m facing the same problem
i tested the hellopck example.. and added the javabuilder.jar to my classpath...
but still its showing the same error that unable to find com.mathworks.javabuilder.* package

Subject: com.mathworks.toolbox.javabuilder package

From: Tizazu

Date: 26 Apr, 2011 19:43:06

Message: 5 of 6

"Saket agarwal" <coolsaket.1204@gmail.com> wrote in message <incupq$gff$1@fred.mathworks.com>...
> hi.. i m facing the same problem
> i tested the hellopck example.. and added the javabuilder.jar to my classpath...
> but still its showing the same error that unable to find com.mathworks.javabuilder.* package

I am having the same problem. Did you fix it?

Subject: com.mathworks.toolbox.javabuilder package

From: Saket agarwal

Date: 27 Apr, 2011 07:33:04

Message: 6 of 6

"Tizazu" wrote in message <ip778a$1eb$1@fred.mathworks.com>...
> "Saket agarwal" <coolsaket.1204@gmail.com> wrote in message <incupq$gff$1@fred.mathworks.com>...
> > hi.. i m facing the same problem
> > i tested the hellopck example.. and added the javabuilder.jar to my classpath...
> > but still its showing the same error that unable to find com.mathworks.javabuilder.* package
>
> I am having the same problem. Did you fix it?

yes... i figured out a way around to deploy my MATLAB generated jar file in my java application..

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com