Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-12-2008, 12:06 PM
Member
 
Join Date: May 2008
Posts: 6
kavithaprabhaker is on a distinguished road
Trouble in Runing
Hi everyone,

i am using NetBeans for writing the program . the program is executing in the netbeans but when i try with the command prompt it is getting compiled but while running it is throwing Exceptions, can any one plz tell me how to fix this problem.

the Exceptions is


C:\Documents and Settings\e415684\My Documents\NetBeansProjects\JavaApplication1
\src\javaapplication1>java example
Exception in thread "main" java.lang.NoClassDefFoundError: example
Caused by: java.lang.ClassNotFoundException: example
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-12-2008, 12:11 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,338
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Did you check that after compiling, the class file is created in the working folder?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-13-2008, 05:40 AM
Eku Eku is offline
Senior Member
 
Join Date: May 2008
Location: Makati, Philippines
Posts: 160
Eku is on a distinguished road
Have you tried compiling it first using javac example.java?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 05-13-2008, 05:45 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 2,338
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Seems to me, he is. See the error list, he run the application and get the runtime error there.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 05-13-2008, 06:56 AM
Member
 
Join Date: May 2008
Posts: 6
kavithaprabhaker is on a distinguished road
Quote:
Originally Posted by Eku View Post
Have you tried compiling it first using javac example.java?
hi,
It is getting compiled but while running it is throwing Exception
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 05-13-2008, 06:59 AM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 508
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
Only you who could only solve your problem....

Why? We don't know the flow of your program.
Agree? disagree?

Post your code here.
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling trouble capacitator CLDC and MIDP 4 06-10-2008 11:12 PM
Compile Trouble adelgado0723 New To Java 5 04-21-2008 03:02 AM
trouble with program jimJohnson New To Java 1 04-03-2008 10:29 AM
Having trouble with array ice22 New To Java 3 11-13-2007 04:06 AM
JTree trouble Alantie Vala AWT / Swing 3 08-01-2007 12:12 AM


All times are GMT +3. The time now is 11:30 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org