Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Runtime Error

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Thanked 0 Times in 0 Posts

    Default Runtime Error

    I tried to run a simple java program and got this error message:

    Exception in thread "main" java.lang.NoClassDefFoundError: welcome3 (wrong name: Welcome3)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    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)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: welcome3. Program will exit.

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Washington, DC
    My Mood
    Thanked 636 Times in 540 Posts

    Default Re: Runtime Error

    How are you trying to run this? What is the name of the class? What is the name of the file?

    Hint: case matters.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. stack project-runtime error
    By makonikor in forum What's Wrong With My Code?
    Replies: 16
    Last Post: July 31st, 2011, 02:16 PM
  2. ERROR using Runtime.getRuntime().exec("arp -a");
    By Runomante in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 4th, 2011, 05:09 PM
  3. Runtime Error
    By SyntheticD in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 10th, 2011, 04:09 PM
  4. Runtime Error running in UVA
    By mathfxr in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 17th, 2010, 02:06 PM
  5. Getting Null Pointer Exception in runtime
    By RoadRunner in forum Exceptions
    Replies: 1
    Last Post: April 26th, 2009, 01:21 PM