I'm writing my first beans.
I have to import a third part library, it is stored at
G:\NoteBook\Uni\534\assingment\weka, including all .class and .java files.
plus a packed .jar file
the first line in my program: import weka.core.*:
my environment setting is: CLASSPATH=.;(path of
java);G:\NoteBook\Uni\534\assingment;G:\NoteBook\Uni\534\assingment\weka\wek
a.jar
when i am coding in JBuilder, i use a similar library setting, it goes well,
however, once i want to load the bean in BDK, there will be an error:
java.lang.NoClassDefFoundError:weka/core/Instances (Instances the one i used
in my program).
i wrote a simple java program, based on the above setting, it runs well, so
what's wrong with my beans, what can I do.
> I'm writing my first beans.
> I have to import a third part library, it is stored at
[quoted text clipped - 12 lines]
> i wrote a simple java program, based on the above setting, it runs well, so
> what's wrong with my beans, what can I do.
Hi, David,
1) I don't think you need to include java in the CLASSPATH. The runtime
classes that came along with Java are loaded by a different mechanism
than the classpath. But on the other hand it won't do harm either.
Your reference to the jar file in the classpath looks right.
2) Any issue related to class loading is the same for beans as for other
classes. No difference.
3) It seems to me that (I don't know BDK) you have no problems compiling
the code, only running it. In some IDEs the classpath settings for
compilation are not the same as those for execution. Look once more at
your execution settings. It IS possible in some cases that a program
will compile beautifully for some classpath, but won't run. That could
happen if you are using some pre-compiled code (such as an externel
library) that has unfulfilled dependencies of it own - they will of
course not complain until runtime. Or, it might happen with codee that
uses reflection.
Good luck.
Soren
David - 28 Aug 2003 02:00 GMT
thanks so much for ur reply, i've solved the problem, i need to configure
the run.bat file of BDK.
i really appreciate ur help.
"Soren" <s_kuula@yahoo.com>
??????:ERa3b.61458$Kb2.2643724@news010.worldonline.dk...
> > I'm writing my first beans.
> > I have to import a third part library, it is stored at
> > G:\NoteBook\Uni\534\assingment\weka, including all .class and .java files.
> > plus a packed .jar file
> > the first line in my program: import weka.core.*:
> > my environment setting is: CLASSPATH=.;(path of
java);G:\NoteBook\Uni\534\assingment;G:\NoteBook\Uni\534\assingment\weka\wek
> > a.jar
> >
[quoted text clipped - 28 lines]
> Good luck.
> Soren