atul vermaa

Greenhorn
+ Follow
since Oct 15, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by atul vermaa

Note that CLASS and CLASSPATH are entirely different things. You will find plenty of bad advice on the internet regarding CLASSPATH, which is probably why you have one set now.



thanks buddy.
i need one more fevor.
wht is the difference between Classpath and path variable. and how to set them while installing a fresh JDK.
Thnaks a Ton in Advance.
17 years ago
i succeed
Thanks a Ton...
17 years ago
@ Akhilesh
yes .class file exist here.

@ sourabh.
Sir i show you the whole scenario.
there are two option showing in environment variable window
1.user variable and
2.System variable
i have add variable name->path
and variable value ->(C:\Program Files\Java\jdk1.5.0_10\bin)
now
As i my folder(dir) is named as Java_prog in D: drive.
i note down java code:
class Hello
{
public static void main(String arg[])
{
System.out.println("Hello");
}
}
and file name is Hello.java saved in Java_prog in D:
now in cmd i have given command viz
D:\Java_prog>javac Hello.java
( successfully compiled)
D:\Java_prog> java Hello
Exception in thread "main" java.lang.NoClassDefFoundError: Hello
...............
now as you advised i did like this
D:\Java_prog>set path=C:\Program Files\Java\jdk1.5.0_10\bin
D:\Java_prog> java hello
Exception in thread "main" java.lang.NoClassDefFoundError: Hello
it is showing the same problem.
.....................
Thanks a Ton in advance.
17 years ago
Thanks Buddy. i did it as you said. now my file is compiled successfully but it is not running and giving me output.
it is showing this error: Exception in thread "main" java.lang.NoClassDefFoundEroor :Hello (Hello is my source code file name)

Thanks a Ton.
17 years ago
hey folks. i am a beginner in Java. i have vista os.. please help me out to set class path environment. i have tried this umpteen time but coudnt make it.
one more favor i need. i have made folder name Java_Prog in D: drive and JDK is installed in C: drive. I write a program in Notepad and save it to Java_Prog folder with .java ext. and on command prompt when i try to compile my .java file then it come up with an error like "class not found exception error."
Please help me out so as i could commence coding.
Thanks a Ton in Advance.
17 years ago