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

    Default Please Help Me...

    Hi

    I am new in java.
    I install java 6 and document api files set the path in environment variable.

    I wrote code in j creator pro

    file name is MyFirstJavaClass.java

    code is:

    class MyFirstJavaClass {
    public static void main(String[] args) {
    System.out.println(“Chocolate, royalties, sleep”);
    }
    }

    When i run or compile that code


    General out put is :

    --------------------Configuration: MyProject - JDK version 1.6.0_20 <Default> - <Default>--------------------
    java.lang.NoClassDefFoundError: MyFirstJavaClass (wrong name: MyFirstjavaclass)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader. java:632)
    at java.lang.ClassLoader.defineClass(ClassLoader.java :616)
    at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader .java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader. java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 48)
    Could not find the main class: MyFirstJavaClass. Program will exit.
    Exception in thread "main"
    Process completed.



    Please anybody tell me where is problem.


  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    7

    Default

    MyFirstJavaClass (wrong name: MyFirstjavaclass)

    Java is case sensitive.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Posting Permissions

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