Re: JDBC Error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Re: JDBC Error

  1. #1
    Wilson Loo Kok Wee Guest

    Re: JDBC Error


    Hello guys. I desperately need some help, please. This is for my college project.
    I've been getting this same error everytime I try to run the compiled java
    source codes:

    >java GridFrame

    Exception in thread "main" java.lang.NoClassDefFoundError: GridFrame (wrong
    name
    : untitled24/GridFrame)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
    1)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)

    Can someone here PLEASE help me? Thanks a million.

  2. #2
    MarkN Guest

    Re: JDBC Error


    Ensure the class is in your classpath. Also, the classpath can point at two
    packages with the same name and the JVM will use the first one it comes to
    - so if your class is in the second but not the first, it won't be found.

    Mark

  3. #3
    Paul Clapham Guest

    Re: JDBC Error

    If you defined your class to be in the package "untitled24" then when you
    compile it, you must ensure the **package** directory is in your classpath,
    and compile it by typing "java untitled24/GridFrame".

    PC2

    "MarkN" <mnuttall@nospam.com> wrote in message
    news:3c04f0ce@147.208.176.211...
    >
    > Ensure the class is in your classpath. Also, the classpath can point at

    two
    > packages with the same name and the JVM will use the first one it comes to
    > - so if your class is in the second but not the first, it won't be found.
    >
    > Mark




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center