Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MyEclipse configuration jdk1.7 run-time error

992480Feb 21 2013 — edited Feb 21 2013
My operating system is: fedora 18/32 bit
MyEclipse version is: 10
1. First I uninstall the system comes with: open - jdk1.6 [forced discharge]
2. Then from oracle website and download the latest version of the jdk1.7
3. I am in terminal execution javac, and Java compiler take package statement Java files can be normal operation.
4. When I will jdk1.7 [local system, not MyEclipse own] attached to the MyEclipse and no error, when I was in MyEclipse inside implementation class, tip: could not find the main class or unable to load.
Question:
Please inform me about how to install your own MyEclipse additional the JDK. Or how to repair this problem? thank you
The Java file is as follows:
package com.w1520.test

public class Test{
public static void main (String []args){
            System.out.println("Hello World");//
}


}
Exception:


Exception in thread "main" java.lang.NoClassDefFoundError: JavaDemo (wrong name: com/w1520/JavaDemo/JavaDemo)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Edited by: 989477 on 2013-2-21 上午3:15
This post has been answered by PhHein on Feb 21 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2013
Added on Feb 21 2013
2 comments
373 views