java - running jar file from my class file in the IDE netbeans -
i use jar file called korat.jar. executed command line:
java -cp $classpath korat.korat --visualize --class test.add --args 3
the classpath contains path of jar , add.class file.
i want execute jar in own program java in netbeans ide. think use:
string []s={test.add.class.getname(),"--visualize","--class","test.add","--args","3"};
korat.main(s);
i exception: java.lang.noclassdeffounderror
what mean "to execute jar in own program"? jar contains classes, if in class path, can instantiate classes , invoke methods. in case, should use test.add class. seems class not in classpath - java.lang.noclassdeffounderror.
Comments
Post a Comment