
Dear java users can anyone help me to run the program in command line prompt i tried by selecting the environment variable and class path and path in my system my program is compiling and generation the class file using javac c:\helloworld.java command and the class file is also getting generated when i run the class file using java helloworld through command prompt class not found error and class loader not able to load and many exception are coming can anyone help me to sort this problem please and iam using windows 7 os
thanking u from ashokkumar

Hi,
Post the error. Where is your class located? Is it in C:// drive?

hai
the error is class not found exception java.lang.class not found exception
E:\Users\ASHOKKUMAR R>"javac" "e:\Program Files\Java\HelloWorld.java"
E:\Users\ASHOKKUMAR R>"java" "e:\Program Files\Java\HelloWorld"
Exception in thread "main" java.lang.NoClassDefFoundError: e:\Program Files\Java
\HelloWorld
Caused by: java.lang.ClassNotFoundException: e:\Program Files\Java\HelloWorld
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: e:\Program Files\Java\HelloWorld. Program will e
xit.
E:\Users\ASHOKKUMAR R>
and my code is
public class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello, World!");
}
}
my sdk location is E:\programfiles\java\jdk1.0.6\bin
my code location is E:\programfiles\java\HelloWorld.java
my os is windows 7

Hello Ashok kumar if you are using windows7 then first set your user variable in advance system setting give the variable name- path and the variable value- C:\Program Files\Java\jdk1.6.0_23\bin; if you are install your java in C drive
after that you set your system variable in advance system setting use variable name- classpath variable value-C:\Program Files\Java\jdk1.6.0_23\jre\bin;; please give the semicolon where it is placed... after doing all this things you can run a java program using command line arguments just write java classname arguments