Here is the following scenario
my classpath in environment variables is .;D/Javarohan; (current directory already specified)
my files are in location D:/Javarohan/In2
Filename in In2 directory is Bwoi.java (i have written the package statement in the Bwoi.java file.....package In2
Now when i go to command prompt and go to the directory and issue the javac as
D:/Javarohan/In2>javac Bwoi.java [Compiles fine]
and next
D:/javarohan/In2> java Bwoi [Press enter]
I get the following no class definition found error
and if i isuue command like below
D:/Javarohan/In2> java In2.Bwoi [I am getting hte right output]
cmdprmt.jpg
I mean when i am in the required directory as according to my CLASSPATH set [.;D/Javarohan;],why should i explicitly issue
the command java In2.Bwoi..Why doesnt it work with java Bwoi ?. This clearly means java application
launcher is not detecting my current directory when i have already specified the dot operator in
CLASSPATH ->.;.D/Javarohan;
is there any solutions for running it in thru command promt by going into the directory D:/Javarohan/In2
and issuing a command like this->java Bwoi
What are the changes i need to do as far as CLASSPATH goes and my package statement in Bwoi.java file?
Please help me out guys ! its funny but serious