Java Error Help?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Java Error Help?

  1. #1
    Triet Guest

    Java Error Help?


    Please help.

    Does anyone what happen if you recieve this error and how to fix it. I am
    new to Java Programming and I hope I could pass this stage so I can go on
    to learn more. Thanks.

    When I run:
    1) javac Saluton.java
    2) java Saluton
    3) I recieved: "Exception in thread "main" java.lang.NoClassDefFoundError"

    The java source code are below:

    public class Saluton {
    public static void main(String[] arguments) {
    String greeting = "Saluton mondo!";
    System.out.println(greeting);
    }
    }

  2. #2
    Richard L Wellman Guest

    Re: Java Error Help?


    I wrote, compiled, and ran your example without error. Though I can't replicate
    your problem, this reminds me of a brief problem I had when having two versions
    of the JDK on the same machine (UNIX). If you are using JDK 1.2, try un-setting
    the environment variable JAVA_HOME and/or checking your CLASSPATH variable.
    Hope one of these suggestions works for you! Feel free to email me directly
    if you have more lengthy follow up questions.

    "Triet" <trietnguyen@owol.net> wrote:
    >
    >Please help.
    >
    >Does anyone what happen if you recieve this error and how to fix it. I

    am
    >new to Java Programming and I hope I could pass this stage so I can go on
    >to learn more. Thanks.
    >
    >When I run:
    >1) javac Saluton.java
    >2) java Saluton
    >3) I recieved: "Exception in thread "main" java.lang.NoClassDefFoundError"
    >
    >The java source code are below:
    >
    >public class Saluton {
    > public static void main(String[] arguments) {
    > String greeting = "Saluton mondo!";
    > System.out.println(greeting);
    > }
    >}



  3. #3
    x x Guest

    Re: Java Error Help?


    probably with the environment.....works fine!

    "Richard L Wellman" <rcwellman@aol.com> wrote:
    >
    >I wrote, compiled, and ran your example without error. Though I can't replicate
    >your problem, this reminds me of a brief problem I had when having two versions
    >of the JDK on the same machine (UNIX). If you are using JDK 1.2, try un-setting
    >the environment variable JAVA_HOME and/or checking your CLASSPATH variable.
    > Hope one of these suggestions works for you! Feel free to email me directly
    >if you have more lengthy follow up questions.
    >
    >"Triet" <trietnguyen@owol.net> wrote:
    >>
    >>Please help.
    >>
    >>Does anyone what happen if you recieve this error and how to fix it. I

    >am
    >>new to Java Programming and I hope I could pass this stage so I can go

    on
    >>to learn more. Thanks.
    >>
    >>When I run:
    >>1) javac Saluton.java
    >>2) java Saluton
    >>3) I recieved: "Exception in thread "main" java.lang.NoClassDefFoundError"
    >>
    >>The java source code are below:
    >>
    >>public class Saluton {
    >> public static void main(String[] arguments) {
    >> String greeting = "Saluton mondo!";
    >> System.out.println(greeting);
    >> }
    >>}

    >



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