[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp (wrong name: helloworldapp/HelloWorldApp)

Asked by MenasheLevi_Inc in Java Standard Edition, New to Java Programming, DOS and Windows

Tags: Java

C:\>dir
 Volume in drive C has no label.
 Volume Serial Number is 1832-5062

 Directory of C:\

10/05/2008  10:00 AM                 0 AUTOEXEC.BAT
11/17/2008  09:55 PM    <DIR>          Brother
10/05/2008  10:00 AM                 0 CONFIG.SYS
10/05/2008  09:55 AM               211 Copy of boot.ini
10/27/2008  06:49 PM    <DIR>          DELL
10/05/2008  10:09 AM    <DIR>          Documents and Settings
02/05/2009  01:36 PM    <DIR>          Inetpub
11/18/2008  10:56 PM    <DIR>          N360_BACKUP
02/06/2009  11:11 PM    <DIR>          Program Files
02/07/2009  10:49 AM    <DIR>          Temp_MyJava
02/07/2009  09:25 AM    <DIR>          WINDOWS
               3 File(s)            211 bytes
               8 Dir(s)  61,218,283,520 bytes free

C:\>cd temp_java
The system cannot find the path specified.

C:\>cd temp_myjava

C:\Temp_MyJava>dir
 Volume in drive C has no label.
 Volume Serial Number is 1832-5062

 Directory of C:\Temp_MyJava

02/07/2009  10:49 AM    <DIR>          .
02/07/2009  10:49 AM    <DIR>          ..
02/07/2009  10:40 AM               450 HelloWorldApp.class
02/07/2009  09:58 AM               594 HelloWorldApp.java
               2 File(s)          1,044 bytes
               2 Dir(s)  61,218,283,520 bytes free

C:\Temp_MyJava>java HelloWorldApp
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp (wrong
name: helloworldapp/HelloWorldApp)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown 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: HelloWorldApp.  Program will exit.

C:\Temp_MyJava>set CLASSPATH=

C:\Temp_MyJava>java HelloWorldApp
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp (wrong
name: helloworldapp/HelloWorldApp)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown 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: HelloWorldApp.  Program will exit.

C:\Temp_MyJava>java helloworldapp
Exception in thread "main" java.lang.NoClassDefFoundError: helloworldapp (wrong
name: helloworldapp/HelloWorldApp)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown 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: helloworldapp.  Program will exit.

C:\Temp_MyJava>
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
/*
 * HelloWorldApp.java
 *
 * Created on February 7, 2009
 *
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
package helloworldapp;
 
/**
 * The HelloWorldApp class implements an application that
 * simply prints "Hello World!" to standard output.
 */
public class HelloWorldApp {
 
    /** Creates a new instance of HelloWorldApp */
    public HelloWorldApp() {
    }
 
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
System.out.println("Hello World!"); // Display the string.
    }
 
}
[+][-]02/08/09 08:42 AM, ID: 23584325Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Java Standard Edition, New to Java Programming, DOS and Windows
Tags: Java
Sign Up Now!
Solution Provided By: basav_com
Participating Experts: 5
Solution Grade: A
 
[+][-]02/07/09 12:45 PM, ID: 23580132Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/07/09 12:53 PM, ID: 23580167Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/07/09 05:56 PM, ID: 23581593Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/07/09 10:16 PM, ID: 23582340Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/08/09 06:23 AM, ID: 23583688Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]02/08/09 02:35 PM, ID: 23586089Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04/22/09 06:36 AM, ID: 24204624Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/08/09 07:05 PM, ID: 25052456Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625