DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page ClassNotFound exception when running Java Application fron within Eclipse
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2008
Default ClassNotFound exception when running Java Application fron within Eclipse - 12-04-2008, 12:38 PM

I am a fairly infrequent user of Eclipse. Although I can compile what is a fairly simple Java application which finds all the Classes defined in a jar file, when I come to run the application I get a ClassNotFound exception. However, if I run the same application from a command line (either specifying the .jar file in the CLASSPATH environment or using the -classpath switch) it runs OK.

In the Project>Properties>Java Build Path I have specified the required .jar file. What am I doing wrong?

Regards,

Stuart Millington
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Oct 2009
Wink Re : ClassNotFound exception - 10-06-2009, 04:33 AM

Hi,

Is it possible that the JRE of eclipse (you can specify this in the preference pane, Java, installed JREs) is not the JRE you use in the command line (you can specify this in your OS environment variables?)?


Grtz,

Paul
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2008
Default 10-06-2009, 05:01 AM

Paul,
Thanks for your reply. It was such a long time ago that I can't remember the exact problem. I am not experiencing problems at the moment, so I assume that I somehow resolved the problem.
Thanks anyway.
Stuart Millington
Reply With Quote
  (#4 (permalink)) Old
Member
 
Posts: 17
Thanks: 1
Thanked 2 Times in 2 Posts
Join Date: Jan 2009
Default 10-06-2009, 05:01 AM

Hi Stuart,

have you created a run configuration (from the "Run"-menu)? There you should have an eye on the "Plug-ins" tab and click "Add required Plug-ins".

Hope that helps,
greetings
Heiko
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running an RCP application as a simple OSGi bundle bestofmed Eclipse 0 11-28-2008 10:00 AM
eclipse/vistajava.lang.NoClassDefFoundError: –Djava/library/path=//lib Exception main adhoul Eclipse 1 11-15-2008 11:52 AM
Problem running application under Tomcat in Eclipse Anonymouslemming Eclipse 0 09-09-2008 09:49 AM
Having birt viewer and other application running on same app server blured75 BI & Reporting 0 09-05-2008 06:19 AM
running SWT application on vista u2ganesh Eclipse 0 08-18-2008 09:17 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com