simple help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jagannathan
    New Member
    • Jul 2006
    • 11

    simple help

    hi there

    Well i got a small with my JRE i think whenever i run a small program as that of hello world i get a error java.lang.NoCla ssDefFoundError

    The code i used is below

    Code:
    import java.lang.*;
    class HelloWorldApp {
        public static void main(String[] args) throws Exception{
           try{
            System.out.println("Hello World!"); // Display the string.
            }
            catch(Exception e)
            { 
             System.out.println(e);
            }
            finally
            {
             System.out.println("Over");
            }
        }
    }
  • vidi
    New Member
    • Sep 2006
    • 4

    #2
    Originally posted by jagannathan
    hi there

    Well i got a small with my JRE i think whenever i run a small program as that of hello world i get a error java.lang.NoCla ssDefFoundError

    The code i used is below

    Code:
    import java.lang.*;
    class HelloWorldApp {
        public static void main(String[] args) throws Exception{
           try{
            System.out.println("Hello World!"); // Display the string.
            }
            catch(Exception e)
            { 
             System.out.println(e);
            }
            finally
            {
             System.out.println("Over");
            }
        }
    }

    Hi,

    You can try to set the classpath to the current directory using dot (.) ... consider the following example:

    cmd> set classpath=.
    cmd> javac test.java
    cmd> java test

    temme if tat helped u ...

    Comment

    Working...