This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Unable to access compiled file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Unable to access compiled file" Watch "Unable to access compiled file" New topic

Unable to access compiled file

pravinth Ganesan

Joined: Oct 23, 2005
Posts: 13
Hai Friends,
I have a collection of java files. i stored them in a different folder(in different drive-d than the actual java jdk pack folder(in c .
I can able to compile separate java files in d: and the compiled class files are stored in d only.
My problem is if i am using 2 java files and one is referring another one:
When i compile the first java file which has no reference of the another one-get compiled corrected and the class file is created on the d: drive directory.
But when i compile the second java file which has reference of the first java -I am getting error message as the first java file - class not found error even it is compiled and there is the compiled class. Even both are in the same directory.

Plz help me.
Thank you.

Have a nice day
pravinth Ganesan

Joined: Oct 23, 2005
Posts: 13
Thanks to:
Ernest Friedman-Hill
I set the class path with current and the java directory as mentioned by "Ernest Friedman-Hill " in another post.
Ernest Friedman-Hill >>in that post:
If you've set CLASSPATH to something, mnake sure it includes a dot (.) to represent the current directory; i.e.,
and it works.
Thank you again Ernest Friedman-Hill
It is sorta covered in the JavaRanch Style Guide.
subject: Unable to access compiled file
It's not a secret anymore!