Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
How to make a java package in matlab

Subject: How to make a java package in matlab

From: Sprinceana

Date: 6 May, 2010 16:50:08

Message: 1 of 4

I want to make a java package using deployment tool of matlab. I'm using matlab 2007b(7.5) that use :


Matlab Compiler 4.7 sur
MCR 7.7 je crois que c'est cette version pour 2007b (7.5)
Matlab Builder for Java 2.0 c'est sur

I have a main file called haar_transf. I have other files that makes reference with this file that are placed in other files when I make deployment tool and select Matlab BUILDER FOR JAVA and then java package. Until here all is ok.


And when I gave build project it gives me an error :

I want to deploy an exe (and a jar file using java package) but I have that error above

After that I need to put this on another computer that uses linux 32bit and upload safely the jar that results from java package


Linux #3 SMP Tue Nov 24 16:54:54 UTC 2009 i686 GNU/Linux

ns3 is the name of server

I don't know why it doesn't generate me a jar file when I make a java package in deployment project.

Here is the printscreen: (I made add file of the files that I have):

Here is the output on deployment tool after I made Java Package and pressed the Build Project button:

I search on web and I know that java package uses a java class that embed all matlab code and makes an exe and a jar file that use java to be compiled.

The problem is that I receive that error above deployment tool output and also I don't know which MCR, Matlab Builder for Java 2.0 to use for linux 32 bit that is the operating system of the second computer (WHICH I MUST RUN my exe and place jar file) that hasn't matlab installed and which I must have the jar file made by the java package ( i think the second computer must have the same versions that I have for my matlab 7.5.(2007b). )

Waiting some good answers in order to guide me!

After receiving this error on deployment tool output it made this folders but I haven't anything inside: (look here to see what he's done after build output of javapath):

JavaPack is the name of Project of type JavaPackage from Deployment Tool: (look here what he's done after building java package):

It's the first time I make a java package using deploymentool of matlab.

Subject: How to make a java package in matlab

From: Sprinceana

Date: 7 May, 2010 08:20:06

Message: 2 of 4

Any ideas ? I don't know what I'm missing truly:(

I added the javapath:


Subject: How to make a java package in matlab

From: Sprinceana

Date: 7 May, 2010 13:24:05

Message: 3 of 4

>> pwd

ans =

C:\Documents and Settings\Production\Mes documents\MATLAB

>> javaaddpath(pwd)

Even though I receive the same error in deployment tool output as listed in the second link in imageshack.

Subject: How to make a java package in matlab

From: Sprinceana

Date: 7 May, 2010 13:53:05

Message: 4 of 4

I solved was the Environment variable for java.

I added this to the Path (name of variable system and now it's working)

C:\Program Files\Java\jdk1.5.0_11\bin

Tags for this Thread

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.

Contact us