View Single Post
Old 05-07-07, 12:16 PM   #3 (permalink)
TAM
Senior Member
 
TAM's Avatar
 
Join Date: Oct 2006
Location: Mayiladurai (TN)
Posts: 233
Thanks: 8
Thanked 7 Times in 5 Posts
Thanks: 8
Thanked 7 Times in 5 Posts
Rep Power: 5 TAM is on a distinguished road
Re: exception in thread main

Your can be solved by following
1) set path variable to the bin folder of java
i.e if u install java on d: then set path as d:\java\jdk5.0\bin;
2) set classpath variable to the folder you want to store your class files
i.e If u wish to store ur files on d:\Javaprgms set classpath as d:\javaprgms;
Note : Your java file is also in the same folder and u also have to compile it on
the same folder so that the corresponding class file is stored in that
folder
3) confirm environment variables by the command
java -version
It shows the version of JAva and other details

If it still results in error check ur code
TAM is offline   Reply With Quote