Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / August 2003

Tip: Looking for answers? Try searching our database.

what's wrong with my environment setting

Thread view: 
David - 24 Aug 2003 11:28 GMT
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.
Soren - 28 Aug 2003 00:07 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.