|
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
|