AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NetBeans 4.1 project runtime problem.

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
MrFredBloggs@hotmail.com
Guest





PostPosted: Thu Jul 14, 2005 12:06 am    Post subject: NetBeans 4.1 project runtime problem. Reply with quote



Hi All,

I have a small Java project in NetBeans 4.1. The project compiles
correctly, but at runtime I get a ClassNotFoundException, even though I
have added the jar file
that the class is in to the classpath (using the NetBeans wizard).
Other classes that I have added to the project using the same method do
not give me a problem.

Any ideas as to how I can solve this.

Thanks,

Fred.

Back to top
Remi Arntzen
Guest





PostPosted: Thu Jul 14, 2005 12:12 am    Post subject: Re: NetBeans 4.1 project runtime problem. Reply with quote



When you "run" your project do you use "java [... whatever ...]" or do
you click on the play button in NetBeans4.1.

If you are useing "java -jar [...]" you have to add the classpath to
the jar's manifest file.

Back to top
MrFredBloggs@hotmail.com
Guest





PostPosted: Thu Jul 14, 2005 12:18 am    Post subject: Re: NetBeans 4.1 project runtime problem. Reply with quote



I click on the "Run Project" option of the the project's popup menu.

Back to top
MrFredBloggs@hotmail.com
Guest





PostPosted: Thu Jul 14, 2005 12:41 am    Post subject: Re: NetBeans 4.1 project runtime problem. Reply with quote

I've solved the problem. I had to add other jar files to the classpath
that are related to the "missing" class.

Thanks for your help.

Fred.

Back to top
Remi Arntzen
Guest





PostPosted: Thu Jul 14, 2005 12:55 am    Post subject: Re: NetBeans 4.1 project runtime problem. Reply with quote

hmmmm...

just to clarify; the jar file is listed in
File>"[PROJECT NAME]" Properties>Libraries tree node

under the compile tab, not the test tab's, or run tab's?

and selecting the "Run" tree node (on the left. not the tab)
you see the correct class listed in the "Main-Class:" argument. (be
certain that it is the full package name of the class.)

other than that I don't really know...

Back to top
Remi Arntzen
Guest





PostPosted: Thu Jul 14, 2005 1:00 am    Post subject: Re: NetBeans 4.1 project runtime problem. Reply with quote

X-No-Archive
opps...

Quote:
Thanks for your help
Welcome! Smile



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.