Results 1 to 7 of 7
  1. #1
    bsudhir6 is offline Member
    Join Date
    Sep 2010
    Posts
    3
    Rep Power
    0

    Exclamation What's the error in this program...

    what's the **** error in this program... it is in SCJP directory

    SFDR.java
    ----------------------------------------------------------------------------
    Java Code:
    package SCJP;
    import java.lang.*;
    public class SFDR 
    {
    public static void main(String[] args)
    {
    System.out.println("this is a class following java code conventions");
    }
    }
    ----------------------------------------------------------------------------
    Last edited by Fubarable; 09-12-2010 at 03:26 AM. Reason: profanity removed

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by bsudhir6 View Post
    what's the **** error in this program...
    I don't know -- how about you tell us what full error message you're getting. Also, please comply with forum rules and watch the language. Profanity removed.

  3. #3
    bsudhir6 is offline Member
    Join Date
    Sep 2010
    Posts
    3
    Rep Power
    0

    Default

    Sorry for using wrong language sir,
    the error while executing is...
    <CODE>
    Exception in thread "main" java.lang.NoClassDefFoundError: SFDR/java
    Caused by: java.lang.ClassNotFoundException: SFDR.java
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: SFDR.java. Program will exit.
    </CODE>

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    It looks to be a classpath issue. How are you compiling and running the code? Have you gone through the classpath section of the introductory tutorials?

  5. #5
    bsudhir6 is offline Member
    Join Date
    Sep 2010
    Posts
    3
    Rep Power
    0

    Default

    No i don't have any knowledge about the class path

  6. #6
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

  7. #7
    s2sgateway is offline Member
    Join Date
    Sep 2010
    Posts
    17
    Rep Power
    0

Similar Threads

  1. Program Error Help!!!
    By arrech326 in forum New To Java
    Replies: 6
    Last Post: 11-18-2009, 12:16 PM
  2. error running java program
    By bdasilva in forum New To Java
    Replies: 1
    Last Post: 06-29-2009, 01:46 AM
  3. I can't fix this runtime error in my program
    By Sinnergy in forum New To Java
    Replies: 5
    Last Post: 02-25-2009, 04:29 PM
  4. CRC check program 1 error
    By javakid9000 in forum New To Java
    Replies: 1
    Last Post: 03-19-2008, 05:04 AM
  5. Replies: 1
    Last Post: 08-07-2007, 07:34 AM

Posting Permissions

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