Results 1 to 6 of 6
  1. #1
    Join Date
    May 2008
    Posts
    6
    Rep Power
    0

    Default 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)

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  3. #3
    Eku
    Eku is offline Senior Member
    Join Date
    May 2008
    Location
    Makati, Philippines
    Posts
    234
    Rep Power
    7

    Default

    Have you tried compiling it first using javac example.java?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Seems to me, he is. See the error list, he run the application and get the runtime error there.

  5. #5
    Join Date
    May 2008
    Posts
    6
    Rep Power
    0

    Default

    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

  6. #6
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Only you who could only solve your problem....

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

    Post your code here.
    freedom exists in the world of ideas

Similar Threads

  1. compiling trouble
    By capacitator in forum CLDC and MIDP
    Replies: 4
    Last Post: 06-10-2008, 10:12 PM
  2. Compile Trouble
    By adelgado0723 in forum New To Java
    Replies: 5
    Last Post: 04-21-2008, 02:02 AM
  3. trouble with program
    By jimJohnson in forum New To Java
    Replies: 1
    Last Post: 04-03-2008, 09:29 AM
  4. Having trouble with array
    By ice22 in forum New To Java
    Replies: 3
    Last Post: 11-13-2007, 03:06 AM
  5. JTree trouble
    By Alantie Vala in forum AWT / Swing
    Replies: 3
    Last Post: 07-31-2007, 11:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •