Thread Subject: JAVA BUILDER ERROR...????

Subject: JAVA BUILDER ERROR...????

From: THANH

Date: 27 Jan, 2012 08:34:10

Message: 1 of 4

Hello everybody, I need my matlab code run in Java, but errors occured during compile process, I dont know what's going on...
Here is the error : "Error: An error occurred while shelling out to javac (error code = 1).
Unable to build executable." - and
error: package com.mathworks.toolbox.javabuilder does not exist import com.mathworks.toolbox.javabuilder.*;
error: cannot find symbol
private static final Set<Disposable> sInstances = new HashSet<Disposable>();...
Im sure that javac was added in computer's environment variables..
Any help is much appriciated!!!!
Thanks in advance...

Subject: JAVA BUILDER ERROR...????

From: GANESH Prabhakar

Date: 7 Feb, 2012 02:03:10

Message: 2 of 4

"THANH " <hoaithanh0610@yahoo.com> wrote in message <jftni2$euv$1@newscl01ah.mathworks.com>...
> Hello everybody, I need my matlab code run in Java, but errors occured during compile process, I dont know what's going on...
> Here is the error : "Error: An error occurred while shelling out to javac (error code = 1).
> Unable to build executable." - and
> error: package com.mathworks.toolbox.javabuilder does not exist import com.mathworks.toolbox.javabuilder.*;
> error: cannot find symbol
> private static final Set<Disposable> sInstances = new HashSet<Disposable>();...
> Im sure that javac was added in computer's environment variables..
> Any help is much appriciated!!!!
> Thanks in advance...

Hello Ganesh Here,
These are some simple things to make it work,cause one of my frnd got the same problem ,i rectified it...
1)Try to run the compiler first by typing 'mbuild -setup',after compiler is started ,just try to compile wat u want.
IF the above thing wont work,there is just problem in your environment variables,try to download the latest JDk available and install it and add it in environment variables...
And one more thing if can post ur environment variables, i will see it and tell u, what exactly the problem is....
Thank u...
 

Subject: JAVA BUILDER ERROR...????

From: THANH

Date: 7 Feb, 2012 05:54:10

Message: 3 of 4

Hello Ganesh,
Thanks for your answer. When I typed mbuild-setup on my matlab(r2011a), there was no java compiler-jdk available there (although i already installed jdk 1.7 on my computer).
So, how could i add java-jdk to matlab compiler?
Thanks.

Subject: JAVA BUILDER ERROR...????

From: GANESH Prabhakar

Date: 7 Feb, 2012 15:47:10

Message: 4 of 4

"THANH " <hoaithanh0610@yahoo.com> wrote in message <jgqea2$mqd$1@newscl01ah.mathworks.com>...
> Hello Ganesh,
> Thanks for your answer. When I typed mbuild-setup on my matlab(r2011a), there was no java compiler-jdk available there (although i already installed jdk 1.7 on my computer).
> So, how could i add java-jdk to matlab compiler?
> Thanks.


check this once ,if anything is not there type it and restart the system.
In Environment variables
section-1,(first box)
user variables for (your computer name)
there shud be..
classpath : C:\Program Files\Java\jdk1.7.0_01\bin;

section-2,(second box)
system variables
There shud be
CLASSPATH : .;C:\Program Files\Java\jre7\lib\ext\QTJava.zip;
JAVA_HOME : C:\Program Files\Java\jdk1.7.0_01
path : C:\Program Files\Java\jdk1.7.0_01\bin;

See all these variables shud be thr correctly.....what ever i have given here it is correct, dont leave the fullstop(.) and semicolon(;) at the start of the CLASSPATH and semicolons too...in JAVA_HOME ... semicolon shud not be thr under system variables...
Hope this will help you..

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
compiler GANESH Prabhakar 7 Feb, 2012 10:49:16
java bulider THANH 7 Feb, 2012 00:59:14
environment var... GANESH Prabhakar 6 Feb, 2012 21:04:16
jdk GANESH Prabhakar 6 Feb, 2012 21:04:16
javabuilder GANESH Prabhakar 6 Feb, 2012 21:04:15
java builder error THANH 27 Jan, 2012 03:39:14
rssFeed for this Thread

Contact us at files@mathworks.com