Iam new to this language. I installed jdk in my system. And i have set the classpath in environment variablesUnnecssary
in PATH system variableNecessary, but you do realize that CLASSPATH is different from PATH?
1) C:\Documents and Settings\Archana>javac ..\..\pgms\Hello.javaWhat's the package statement inside Hello.java?
Compilation is working.
Archana1604 wrote:The required argument for the java.exe application launcher is the fully qualified (and case sensitive) class name. It is not a file or path. Fully qualified class name means the package name plus the class name. If your source code starts with for example "package some.pack;" then the fully qualified class name is some.pack.Hello but if there is no package statement, then the fully qualified class name is the same as the class name - Hello.
If i try to compile the program by giving the command C:\>javac pgms\Hello.java it is getting compiled but when i execute it by giving the command C:\>java pgms\Hello it is giving java.lang.NoClassDefFoundError.