From: petit on
hello,

i try to run the .jar file made by java builder without success. i searched informations on the web but there is not a lot of doc about this. i tried with a very simple .m code (test_plot.m) :
--------------------------------
function test_plot
x=1:100;
y=x.^2;
plot(x,y);
end
--------------------------------

After build with deploytool , i have two directories (src and distrib). i did the following command under debian :

$ cd src/classes/test_plot/
$ls
test_plot.ctf Test_plotMCRFactory.class Test_plot$1.class
Test_plotRemote.class Test_plot.class
$ jar cvmf manifest.mf test_plot.jar Test_plot*.class

where i added in the directory manifest.mf file with "main-Class: test_plot".

It doesn't run : $ java -jar test_plot.jar
fails.

So, from what i understood, java builder makes java classes from a .m code but how to use these classes and the jar file in order to make it run with java.
I use Netbeans for java ide and It seems that we have to import the jar file in the library.
Then, i created a new project under netbeans and added in Libraries "test_plot.jar".

i have got the following source code "Main.java" :
-------------------------------------------------------------------------
package test_plot;

/**
*
* @author fab
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
}

}
---------------------------------------------------------------------------

What do i have to do now in this source to get the equivalent java application of test_plot.m.

Regards,
jean petit.